CI: split and rename the workflows to windows/macos/linux

"main" is a bit non-descriptive, let's name them after the platforms we run them
on. Splitting them up allows us to be less selective on how we run the various
workflows, e.g. always running the linux one.
master
Peter Hutterer 2022-01-17 14:05:41 +10:00
parent 9bbe629aad
commit 121cd37753
4 changed files with 130 additions and 108 deletions

43
.github/workflows/linux.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: linux
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Set permissions at the job level.
permissions: {}
jobs:
linux:
runs-on: ubuntu-20.04
permissions:
contents: read
strategy:
matrix:
compiler: [clang, gcc]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade meson
sudo apt install -y \
doxygen libxcb-xkb-dev valgrind ninja-build \
libwayland-dev wayland-protocols bison graphviz
- name: Setup
run: |
meson setup build
env:
CC: ${{ matrix.compiler }}
- name: Build
run: |
meson compile -C build
- name: Test
run:
meson test -C build --print-errorlogs --setup=valgrind --no-suite python-tests

40
.github/workflows/macos.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: macos
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Set permissions at the job level.
permissions: {}
jobs:
macos:
runs-on: macos-10.15
permissions:
contents: read
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade meson
brew install libxml2 doxygen bison ninja
brew link bison --force
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Setup
run: |
PATH="/usr/local/opt/bison/bin:${PATH}" meson setup -Denable-wayland=false -Denable-x11=false build
- name: Build
run: |
PATH="/usr/local/opt/bison/bin:${PATH}" meson compile -C build
- name: Test
run:
meson test -C build --print-errorlogs

View File

@ -1,108 +0,0 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Set permissions at the job level.
permissions: {}
jobs:
linux:
runs-on: ubuntu-20.04
permissions:
contents: read
strategy:
matrix:
compiler: [clang, gcc]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade meson
sudo apt install -y \
doxygen libxcb-xkb-dev valgrind ninja-build \
libwayland-dev wayland-protocols bison graphviz
- name: Setup
run: |
meson setup build
env:
CC: ${{ matrix.compiler }}
- name: Build
run: |
meson compile -C build
- name: Test
run:
meson test -C build --print-errorlogs --setup=valgrind --no-suite python-tests
macos:
runs-on: macos-10.15
permissions:
contents: read
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade meson
brew install libxml2 doxygen bison ninja
brew link bison --force
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Setup
run: |
PATH="/usr/local/opt/bison/bin:${PATH}" meson setup -Denable-wayland=false -Denable-x11=false build
- name: Build
run: |
PATH="/usr/local/opt/bison/bin:${PATH}" meson compile -C build
- name: Test
run:
meson test -C build --print-errorlogs
windows:
runs-on: windows-2019
permissions:
contents: read
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
shell: powershell
run: |
python -m pip install --upgrade meson
Invoke-WebRequest -Uri https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-win.zip -OutFile ninja.zip
Invoke-WebRequest -Uri https://github.com/lexxmark/winflexbison/releases/download/v2.5.23/win_flex_bison-2.5.23.zip -OutFile win_flex_bison.zip
Expand-Archive -Path win_flex_bison.zip -DestinationPath bin
Expand-Archive -Path ninja.zip -DestinationPath bin
Write-Output ((Get-Location).ToString() + "./bin") | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Setup
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
meson setup -Denable-wayland=false -Denable-x11=false -Denable-docs=false -Denable-xkbregistry=false build
env:
CC: cl
- name: Build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
meson compile -C build
- name: Test
run:
meson test -C build --print-errorlogs

47
.github/workflows/windows.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Set permissions at the job level.
permissions: {}
jobs:
windows:
runs-on: windows-2019
permissions:
contents: read
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
shell: powershell
run: |
python -m pip install --upgrade meson
Invoke-WebRequest -Uri https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-win.zip -OutFile ninja.zip
Invoke-WebRequest -Uri https://github.com/lexxmark/winflexbison/releases/download/v2.5.23/win_flex_bison-2.5.23.zip -OutFile win_flex_bison.zip
Expand-Archive -Path win_flex_bison.zip -DestinationPath bin
Expand-Archive -Path ninja.zip -DestinationPath bin
Write-Output ((Get-Location).ToString() + "./bin") | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Setup
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
meson setup -Denable-wayland=false -Denable-x11=false -Denable-docs=false -Denable-xkbregistry=false build
env:
CC: cl
- name: Build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
meson compile -C build
- name: Test
run:
meson test -C build --print-errorlogs