adding readme #52
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
| name: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-22.04, ubuntu-24.04 ] | |
| compiler: [ gcc-10, gcc-11, gcc-12, gcc-13, clang-14, clang-15, clang-16, clang-17, clang-18, icx ] | |
| steps: | |
| - name: Check skip list | |
| id: skip_check | |
| run: | | |
| skip_list=( | |
| ) | |
| combo="${{ matrix.os }}:${{ matrix.compiler }}" | |
| echo "Checking combination: $combo" | |
| for skip in "${skip_list[@]}"; do | |
| if [[ "$combo" == "$skip" ]]; then | |
| echo "SKIP_COMPILE=true" >> "$GITHUB_ENV" | |
| exit 0 | |
| fi | |
| done | |
| echo "SKIP_COMPILE=false" >> "$GITHUB_ENV" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run build inside container | |
| if: env.SKIP_COMPILE == 'false' | |
| run: | | |
| env | grep '^GITHUB_' > github.env | |
| podman run --env-file github.env --rm --userns=keep-id -v /var/github:/var/github ci-${{ matrix.os }} bash -c ' | |
| set -e | |
| echo "Running inside container: ${{ matrix.os }} + ${{ matrix.compiler }}" | |
| cd ${{ github.workspace }} | |
| compiler=${{ matrix.compiler }} | |
| if [[ $compiler == gcc-* ]]; then | |
| export CC=$compiler | |
| export CXX=g++-${compiler#gcc-} | |
| elif [[ $compiler == clang-* ]]; then | |
| export CC=$compiler | |
| export CXX=clang++-${compiler#clang-} | |
| elif [[ $compiler == icx ]]; then | |
| # Load Intel oneAPI environment | |
| source /opt/intel/oneapi/setvars.sh > /dev/null | |
| export CC=icx | |
| export CXX=icpx | |
| fi | |
| cmake -B build -DCMAKE_CXX_COMPILER=$CXX | |
| cmake --build build -- -j$(nproc) | |
| build/runner_test | |
| echo "||" $GITHUB_RUN_NUMBER $GITHUB_RUN_ID $GITHUB_REPOSITORY_ID "||" | |
| ' | |
| - name: Record Badge Status | |
| if: always() | |
| run: | | |
| mkdir -p badge-status | |
| if [[ "$SKIP_COMPILE" == "true" ]]; then | |
| status="skipped" | |
| else | |
| status="${{ job.status }}" | |
| fi | |
| cat <<EOF > badge-status/status-${{ matrix.os }}-${{ matrix.compiler }}.json | |
| { | |
| "os": "${{ matrix.os }}", | |
| "compiler": "${{ matrix.compiler }}", | |
| "status": "$status" | |
| } | |
| EOF | |
| - name: Upload Status Artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: status-${{ matrix.os }}-${{ matrix.compiler }} | |
| path: badge-status/status-${{ matrix.os }}-${{ matrix.compiler }}.json | |
| overwrite: true | |
| generate-dashboard: | |
| name: Generate unified dashboard | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: always() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all badge status artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: badge-status | |
| pattern: status-* | |
| merge-multiple: true | |
| - name: Generate unified dashboard | |
| run: python3 scripts/ci-generate-dashboard.py | |
| - name: Upload dashboard to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./ | |
| destination_dir: badges |