refactor ci to use a build matrix for linux
This commit is contained in:
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@@ -7,13 +7,21 @@ on:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
# maybe pull into matrix?
|
||||
BUILD_TYPE: Debug
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
timeout-minutes: 10
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{matrix.os}}
|
||||
name: ${{matrix.type}} on ${{matrix.os}}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
type: ['', 'asan']
|
||||
os: ['ubuntu-latest', 'ubuntu-24.04-arm']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -21,39 +29,15 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt update && sudo apt -y install libsodium-dev cmake libx11-dev libxext-dev libxrandr-dev
|
||||
run: sudo apt update && sudo apt -y install libsodium-dev cmake libx11-dev libxext-dev libxrandr-dev
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{github.event.repository.name}}-${{github.job}}
|
||||
key: ${{github.event.repository.name}}-${{github.job}}-${{matrix.os}}-${{matrix.type}}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
||||
|
||||
linux-arm:
|
||||
timeout-minutes: 10
|
||||
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt update && sudo apt -y install libsodium-dev cmake libx11-dev libxext-dev libxrandr-dev
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{github.event.repository.name}}-${{github.job}}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DTOMATO_ASAN=${{matrix.type == 'asan' && 'ON' || 'OFF'}}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
||||
|
Reference in New Issue
Block a user