Convert Continuous integration build jobs to matrix strategy (v2)
This commit is contained in:
+44
-130
@@ -7,9 +7,45 @@ on:
|
||||
name: Continuous integration
|
||||
|
||||
jobs:
|
||||
ubuntu-build-x86_64:
|
||||
name: Ubuntu x86_64
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-13, windows-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
name: Ubuntu x86_64
|
||||
arch: x86_64
|
||||
install: sudo apt-get update && sudo apt-get install -y libasound2-dev libgl-dev libglu1-mesa-dev libgtk-3-dev libjack-dev libmad0-dev libpulse-dev libudev-dev libxinerama-dev libx11-dev libxrandr-dev libxtst-dev nasm
|
||||
configure: cmake -B build -DWITH_FFMPEG_JOBS="$(nproc)"
|
||||
build: cmake --build build --parallel "$(nproc)"
|
||||
- os: ubuntu-24.04-arm
|
||||
name: Ubuntu ARM
|
||||
arch: arm
|
||||
install: sudo apt-get update && sudo apt-get install -y libasound2-dev libgl-dev libglu1-mesa-dev libgtk-3-dev libjack-dev libmad0-dev libpulse-dev libudev-dev libxinerama-dev libx11-dev libxrandr-dev libxtst-dev nasm
|
||||
configure: cmake -B build -DWITH_FFMPEG_JOBS="$(nproc)" -DWITH_MINIMAID=OFF
|
||||
build: cmake --build build --parallel "$(nproc)"
|
||||
- os: macos-latest
|
||||
name: macOS (M1)
|
||||
arch: arm64
|
||||
install: brew install nasm
|
||||
configure: cmake -B build -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_FFMPEG_JOBS="$(sysctl -n hw.logicalcpu)"
|
||||
build: cmake --build build --parallel "$(sysctl -n hw.logicalcpu)"
|
||||
- os: macos-13
|
||||
name: macOS (Intel)
|
||||
arch: x86_64
|
||||
install: brew install nasm
|
||||
configure: cmake -B build -DCMAKE_OSX_ARCHITECTURES=x86_64 -DWITH_FFMPEG_JOBS="$(sysctl -n hw.logicalcpu)"
|
||||
build: cmake --build build --parallel "$(sysctl -n hw.logicalcpu)"
|
||||
- os: windows-latest
|
||||
name: Windows
|
||||
arch: x64
|
||||
install: |
|
||||
$vsPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
||||
&"$vsPath\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
configure: cmake -B build -DWITH_FFMPEG_JOBS="$env:NUMBER_OF_PROCESSORS"
|
||||
build: cmake --build build --parallel "$env:NUMBER_OF_PROCESSORS"
|
||||
name: ${{ matrix.name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -21,134 +57,13 @@ jobs:
|
||||
build
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-cmake-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ runner.arch }}-cmake-build-
|
||||
${{ runner.os }}-${{ matrix.arch }}-cmake-build-
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y
|
||||
libasound2-dev
|
||||
libgl-dev
|
||||
libglu1-mesa-dev
|
||||
libgtk-3-dev
|
||||
libjack-dev
|
||||
libmad0-dev
|
||||
libpulse-dev
|
||||
libudev-dev
|
||||
libxinerama-dev
|
||||
libx11-dev
|
||||
libxrandr-dev
|
||||
libxtst-dev
|
||||
nasm
|
||||
run: ${{ matrix.install }}
|
||||
- name: Configure
|
||||
run: cmake -B build -DWITH_FFMPEG_JOBS="$(nproc)"
|
||||
run: ${{ matrix.configure }}
|
||||
- name: Build
|
||||
run: cmake --build build --parallel "$(nproc)"
|
||||
|
||||
ubuntu-build-arm:
|
||||
name: Ubuntu ARM
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Cache CMake build directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
build
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-cmake-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ runner.arch }}-cmake-build-
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y
|
||||
libasound2-dev
|
||||
libgl-dev
|
||||
libglu1-mesa-dev
|
||||
libgtk-3-dev
|
||||
libjack-dev
|
||||
libmad0-dev
|
||||
libpulse-dev
|
||||
libudev-dev
|
||||
libxinerama-dev
|
||||
libx11-dev
|
||||
libxrandr-dev
|
||||
libxtst-dev
|
||||
nasm
|
||||
- name: Configure
|
||||
run: cmake -B build -DWITH_FFMPEG_JOBS="$(nproc)" -DWITH_MINIMAID=OFF
|
||||
- name: Build
|
||||
run: cmake --build build --parallel "$(nproc)"
|
||||
|
||||
macos-build-arm64:
|
||||
name: macOS (M1)
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Cache CMake build directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
build
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-cmake-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ runner.arch }}-cmake-build-
|
||||
- name: Install dependencies
|
||||
run: brew install
|
||||
nasm
|
||||
- name: Configure
|
||||
run: cmake -B build -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_FFMPEG_JOBS="$(sysctl -n hw.logicalcpu)"
|
||||
- name: Build
|
||||
run: cmake --build build --parallel "$(sysctl -n hw.logicalcpu)"
|
||||
|
||||
macos-build-x86_64:
|
||||
name: macOS (Intel)
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Cache CMake build directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
build
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-cmake-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ runner.arch }}-cmake-build-
|
||||
- name: Install dependencies
|
||||
run: brew install
|
||||
nasm
|
||||
- name: Configure
|
||||
run: cmake -B build -DCMAKE_OSX_ARCHITECTURES=x86_64 -DWITH_FFMPEG_JOBS="$(sysctl -n hw.logicalcpu)"
|
||||
- name: Build
|
||||
run: cmake --build build --parallel "$(sysctl -n hw.logicalcpu)"
|
||||
|
||||
windows-build:
|
||||
name: Windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Set up Visual Studio environment
|
||||
run: |
|
||||
$vsPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
||||
&"$vsPath\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
shell: pwsh
|
||||
- name: Cache CMake build directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
build
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-cmake-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ runner.arch }}-cmake-build-
|
||||
- name: Configure
|
||||
run: cmake -B build -DWITH_FFMPEG_JOBS="$env:NUMBER_OF_PROCESSORS"
|
||||
- name: Build
|
||||
run: cmake --build build --parallel "$env:NUMBER_OF_PROCESSORS"
|
||||
run: ${{ matrix.build }}
|
||||
|
||||
validate-xml-docs:
|
||||
name: Validate Lua.xml, LuaDocumentation.xml
|
||||
@@ -156,8 +71,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y
|
||||
libxml2-utils
|
||||
run: sudo apt-get update && sudo apt-get install -y libxml2-utils
|
||||
- name: Validate Lua.xml
|
||||
run: xmllint --noout Docs/Luadoc/Lua.xml
|
||||
- name: Validate LuaDocumentation.xml
|
||||
|
||||
Reference in New Issue
Block a user