Repository navigation
CI: Upgrade to actions/checkout@v7 #153
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # build_and_run_tests.yml | |
| name: Build and test run | |
| # Controls when the action will run. Here when we enter 'git push' | |
| on: | |
| push: | |
| branches: main | |
| path-ignore: | |
| - README.md | |
| - LICENSE.txt | |
| - .vscode | |
| - data | |
| - debian | |
| pull_request: | |
| branches: main | |
| path-ignore: | |
| - README.md | |
| - LICENSE.txt | |
| - .vscode | |
| - data | |
| - debian | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| buildntest: | |
| name: Build and Tests | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, ubuntu-26.04 ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - run: | | |
| echo "Job triggered by ${{ github.event_name }} event, running on ${{ runner.os }}." | |
| echo "Branch ${{ github.ref }} on repository ${{ github.repository }}" | |
| - name: Check out repository code | |
| uses: actions/checkout@v7 | |
| - name: Install Ninja and libgit2 | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y ninja-build libgit2-dev | |
| - name: Fetch meson version for building | |
| uses: robinraju/release-downloader@v1.6 | |
| with: | |
| repository: "mesonbuild/meson" | |
| tag: "1.7.0" | |
| fileName: "*.tar.gz" | |
| - name: Unpack meson tar ball and remove downloaded file | |
| run: | | |
| tar -xzf meson-*.tar.gz | |
| rm meson-*.tar.gz | |
| - name: Create symbolic link for Meson | |
| run: | | |
| ln -s meson-*/meson.py . | |
| - name: Configure build directories | |
| run: | | |
| ./meson.py setup --buildtype=release build.release | |
| ./meson.py setup --buildtype=debug build.asan -Db_sanitize=address | |
| - name: Build and run release tests | |
| id: buildnormal | |
| run: ./meson.py test -C build.release | |
| - name: Save error logs | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ always() && steps.buildnormal.outcome == 'failure' }} | |
| with: | |
| name: Meson-logs-${{ matrix.os }} | |
| path: build.release/meson-logs/ | |
| - name: Build and run ASAN tests | |
| id: buildasan | |
| run: ./meson.py test -C build.asan | |
| - name: Save error logs | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ always() && steps.buildasan.outcome == 'failure' }} | |
| with: | |
| name: Meson-logs-${{ matrix.os }} | |
| path: build.asan/meson-logs/ |