name: CI on: push: branches: [main] paths-ignore: ['README.md', 'LICENSES/**'] pull_request: paths-ignore: ['README.md', 'LICENSES/**'] jobs: build: # Arch Linux only ships x86_64 images, so pick an amd64 runner. runs-on: amd64 # Arch with the build dependencies preinstalled; see ci-image.yml. container: git.trivk.dev/tri/qtpotato-ci:latest env: CCACHE_DIR: ${{ github.workspace }}/.ccache # Keep hits across weekly image rebuilds when the compiler did not change. CCACHE_COMPILERCHECK: content CCACHE_MAXSIZE: 500M steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 with: path: .ccache key: ccache-${{ github.sha }} restore-keys: ccache- - name: Configure # The tests do not load QML, so skip QML cachegen and debug info: they take over # half of the build. Release and AUR builds keep both. run: | cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=-O0 \ -DQT_QML_NO_CACHEGEN=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBUILD_TESTING=ON - name: Build run: | ccache -z cmake --build build ccache -s - name: Test env: QT_QPA_PLATFORM: offscreen run: ctest --test-dir build --output-on-failure