Skip to content

Add Github action to test building with GCC and Clang #1

Add Github action to test building with GCC and Clang

Add Github action to test building with GCC and Clang #1

Workflow file for this run

name: Test builds
on:
push:
branches:
- main
workflow_dispatch:
jobs:
setup-matrix:
runs-on: ubuntu-latest
name: Test changed files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
json: true
files: |
*/src/day*.cpp
*/src/lib.h*
*/Makefile
# reference: https://stackoverflow.com/a/65094398
- name: Setup matrix combinations
id: setup-matrix-combinations
run: python ${GITHUB_WORKSPACE}/.github/workflows/gen_matrix.py "${{ steps.changed-files.outputs.all_changed_files }}"
outputs:
matrix-combinations: ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }}
matrix-job:
runs-on: ubuntu-latest
needs: setup-matrix
strategy:
matrix:
${{ fromJson(needs.setup-matrix.outputs.matrix-combinations) }}
steps:
- name: Build targets
run: |
cd ${{ matrix.dir }}

Check failure on line 43 in .github/workflows/test-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-build.yml

Invalid workflow file

You have an error in your yaml syntax on line 43
make -j2 CXX=${{ matrix.compiler }} DISABLE_BEAR=TRUE build/release/${{ matrix.target }} build/debug/${{ matrix.target }}