mirror of
https://github.com/mesonbuild/meson.git
synced 2026-08-13 17:07:04 +00:00
CI: Port MSYS2 from azure-pipelines to github actions
This uses the msys2/setup-msys2@v2 to set up MSYS2
This commit is contained in:
committed by
Jussi Pakkanen
parent
6d816c1800
commit
f000fa407d
86
.github/workflows/msys2.yml
vendored
Normal file
86
.github/workflows/msys2.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
name: msys2
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: windows-2019
|
||||
name: ${{ matrix.NAME }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- NAME: gccx86ninja
|
||||
MSYSTEM: MINGW32
|
||||
MSYS2_ARCH: i686
|
||||
MSYS2_CURSES: ncurses
|
||||
COMPILER: gcc
|
||||
TOOLCHAIN: toolchain
|
||||
- NAME: gccx64ninja
|
||||
MSYSTEM: MINGW64
|
||||
MSYS2_ARCH: x86_64
|
||||
MSYS2_CURSES: pdcurses
|
||||
COMPILER: gcc
|
||||
TOOLCHAIN: toolchain
|
||||
- NAME: clangx64ninja
|
||||
MSYSTEM: MINGW64
|
||||
MSYS2_ARCH: x86_64
|
||||
MSYS2_CURSES:
|
||||
COMPILER: clang
|
||||
TOOLCHAIN: clang
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.MSYSTEM }}
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
mercurial
|
||||
lcov
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-cmake
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-libxml2
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-python2
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-python
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-python-lxml
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-python-setuptools
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip
|
||||
mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.TOOLCHAIN }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
export BOOST_ROOT=
|
||||
export PATHEXT="$PATHEXT;.py"
|
||||
|
||||
if [[ '${{ matrix.COMPILER }}' == 'clang' ]]; then
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export OBJC=clang
|
||||
export OBJCXX=clang++
|
||||
fi
|
||||
|
||||
if [[ "${{ matrix.MSYS2_CURSES }}" != "" ]]; then
|
||||
pacman --noconfirm --needed -S mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYS2_CURSES }}
|
||||
fi
|
||||
|
||||
MSYSTEM= python3 run_tests.py --backend=ninja
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.NAME }}
|
||||
path: meson-test-run.*
|
||||
@@ -141,76 +141,3 @@ jobs:
|
||||
inputs:
|
||||
testResultsFiles: meson-test-run.xml
|
||||
testRunTitle: $(System.JobName)
|
||||
|
||||
- job: msys2
|
||||
pool:
|
||||
vmImage: VS2017-Win2016
|
||||
strategy:
|
||||
matrix:
|
||||
gccx86ninja:
|
||||
MSYSTEM: MINGW32
|
||||
MSYS2_ARCH: i686
|
||||
MSYS2_CURSES: ncurses
|
||||
compiler: gcc
|
||||
gccx64ninja:
|
||||
MSYSTEM: MINGW64
|
||||
MSYS2_ARCH: x86_64
|
||||
MSYS2_CURSES: pdcurses
|
||||
MESON_RSP_THRESHOLD: 0
|
||||
compiler: gcc
|
||||
clangx64ninja:
|
||||
MSYSTEM: MINGW64
|
||||
MSYS2_ARCH: x86_64
|
||||
MSYS2_CURSES:
|
||||
compiler: clang
|
||||
variables:
|
||||
MSYS2_ROOT: $(System.Workfolder)\msys64
|
||||
steps:
|
||||
- script: |
|
||||
choco install msys2 --params="/InstallDir:%MSYS2_ROOT% /NoUpdate /NoPath"
|
||||
displayName: Install MSYS2
|
||||
- script: |
|
||||
set PATH=%MSYS2_ROOT%\usr\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
|
||||
if %compiler%==gcc ( set "TOOLCHAIN=mingw-w64-$(MSYS2_ARCH)-toolchain" ) else ( set "TOOLCHAIN=mingw-w64-$(MSYS2_ARCH)-clang" )
|
||||
%MSYS2_ROOT%\usr\bin\pacman --noconfirm --needed -S ^
|
||||
base-devel ^
|
||||
git ^
|
||||
mercurial ^
|
||||
mingw-w64-$(MSYS2_ARCH)-cmake ^
|
||||
mingw-w64-$(MSYS2_ARCH)-lcov ^
|
||||
mingw-w64-$(MSYS2_ARCH)-libxml2 ^
|
||||
mingw-w64-$(MSYS2_ARCH)-ninja ^
|
||||
mingw-w64-$(MSYS2_ARCH)-pkg-config ^
|
||||
mingw-w64-$(MSYS2_ARCH)-python2 ^
|
||||
mingw-w64-$(MSYS2_ARCH)-python3 ^
|
||||
mingw-w64-$(MSYS2_ARCH)-python3-lxml ^
|
||||
mingw-w64-$(MSYS2_ARCH)-python3-setuptools ^
|
||||
mingw-w64-$(MSYS2_ARCH)-python3-pip ^
|
||||
%TOOLCHAIN%
|
||||
if not "%MSYS2_CURSES%" == "" ( %MSYS2_ROOT%\usr\bin\pacman --noconfirm --needed -S mingw-w64-$(MSYS2_ARCH)-$(MSYS2_CURSES) )
|
||||
%MSYS2_ROOT%\usr\bin\bash -lc "python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile"
|
||||
displayName: Install Dependencies
|
||||
- script: |
|
||||
set BOOST_ROOT=
|
||||
set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
|
||||
set PATHEXT=%PATHEXT%;.py
|
||||
if %compiler%==clang ( set CC=clang && set CXX=clang++ && set OBJC=clang && set OBJCXX=clang++ )
|
||||
%MSYS2_ROOT%\usr\bin\bash -lc "MSYSTEM= python3 run_tests.py --backend=ninja"
|
||||
env:
|
||||
CHERE_INVOKING: yes
|
||||
displayName: Run Tests
|
||||
- task: CopyFiles@2
|
||||
condition: not(canceled())
|
||||
inputs:
|
||||
contents: 'meson-test-run.*'
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
artifactName: $(System.JobName)
|
||||
# publishing artifacts from PRs from a fork is currently blocked
|
||||
condition: and(eq(variables['system.pullrequest.isfork'], false), not(canceled()))
|
||||
- task: PublishTestResults@2
|
||||
condition: not(canceled())
|
||||
inputs:
|
||||
testResultsFiles: meson-test-run.xml
|
||||
testRunTitle: $(System.JobName)
|
||||
|
||||
Reference in New Issue
Block a user