docs: overdrive GitHub Pages whitepaper portal #118
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
| # .github/workflows/ci.yml | |
| # ============================================================================= | |
| # fq-compressor CI Pipeline | |
| # ============================================================================= | |
| # Unified CI workflow: format check, build, test | |
| # ============================================================================= | |
| name: CI | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CI_IMAGE_NAME: fqcompressor-ci | |
| jobs: | |
| format-check: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build CI image | |
| run: docker build -f docker/Dockerfile.dev --target base -t ${{ env.CI_IMAGE_NAME }}:format . | |
| - name: Check formatting | |
| run: docker run --rm -v "${{ github.workspace }}:/workspace" -w /workspace ${{ env.CI_IMAGE_NAME }}:format ./scripts/lint.sh format-check | |
| build-and-test: | |
| name: Build & Test (${{ matrix.preset }}) | |
| runs-on: ubuntu-latest | |
| needs: format-check | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| preset: [gcc-release, clang-debug, clang-release] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache Conan | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.conan2 | |
| key: ${{ runner.os }}-conan-${{ hashFiles('conanfile.py') }} | |
| - name: Cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ccache | |
| key: ${{ runner.os }}-ccache-${{ matrix.preset }}-${{ github.sha }} | |
| restore-keys: ${{ runner.os }}-ccache-${{ matrix.preset }}- | |
| - name: Prepare cache dirs | |
| run: mkdir -p "$HOME/.conan2" "$HOME/.cache/ccache" | |
| - name: Build CI image | |
| run: docker build -f docker/Dockerfile.dev --target base -t ${{ env.CI_IMAGE_NAME }}:${{ matrix.preset }} . | |
| - name: Build | |
| run: | | |
| docker run --rm --user "$(id -u):$(id -g)" \ | |
| -v "${{ github.workspace }}:/workspace" \ | |
| -v "$HOME/.conan2:/tmp/conan2" \ | |
| -v "$HOME/.cache/ccache:/tmp/ccache" \ | |
| -e HOME=/tmp -e CONAN_HOME=/tmp/conan2 -e CCACHE_DIR=/tmp/ccache \ | |
| -e PATH=/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ | |
| -w /workspace ${{ env.CI_IMAGE_NAME }}:${{ matrix.preset }} \ | |
| ./scripts/build.sh ${{ matrix.preset }} | |
| - name: Test | |
| run: | | |
| docker run --rm --user "$(id -u):$(id -g)" \ | |
| -v "${{ github.workspace }}:/workspace" \ | |
| -v "$HOME/.conan2:/tmp/conan2" \ | |
| -v "$HOME/.cache/ccache:/tmp/ccache" \ | |
| -e HOME=/tmp -e CONAN_HOME=/tmp/conan2 -e CCACHE_DIR=/tmp/ccache \ | |
| -e PATH=/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ | |
| -w /workspace ${{ env.CI_IMAGE_NAME }}:${{ matrix.preset }} \ | |
| ./scripts/test.sh ${{ matrix.preset }} | |
| - name: Upload artifacts | |
| if: endsWith(matrix.preset, 'release') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fqcompressor-${{ matrix.preset }} | |
| path: build/${{ matrix.preset }}/src/fqc | |
| retention-days: 7 |