|
| 1 | +# SPDX-License-Identifier: MPL-2.0 |
| 2 | +# |
| 3 | +# chapel-ci — strict CI gates for the OPTIONAL Chapel mass-panic harness. |
| 4 | +# |
| 5 | +# The Rust binary stands alone (USB-stick-portable, single-machine). chapel/ is |
| 6 | +# a detachable multi-machine harness on top. This workflow exercises the harness |
| 7 | +# and the Rust↔Chapel contract surface. Path triggers are scoped so a pure-Rust |
| 8 | +# PR that doesn't touch chapel/ or src/main.rs leaves these jobs unrun, and |
| 9 | +# removing chapel/ entirely leaves the Rust CI path (rust-ci.yml) green. |
| 10 | +# |
| 11 | +# Six strict jobs (no continue-on-error): |
| 12 | +# 1. chapel-parse-check — chpl --parse-only on every module |
| 13 | +# 2. chapel-build — just chapel-build-ci (no toolbox) |
| 14 | +# 3. chapel-smoke — chapel/smoke/two_repo_smoke (Chapel data flow) |
| 15 | +# 4. chapel-e2e — mass-panic end-to-end (-nl 1) on a synthetic |
| 16 | +# 2-repo manifest. True -nl 2 requires CHPL_COMM=gasnet |
| 17 | +# which the stock .deb doesn't ship; tracked for Wave 2. |
| 18 | +# 5. chapel-cli-contract — assert panic-attack describe-contract matches fixture |
| 19 | +# 6. chapel-rust-diff — rayon assemblyline vs Chapel single-locale aggregates |
| 20 | +# |
| 21 | +# Wave 2 hardening tracker: SHA-pin the Chapel 2.8.0 .deb download. Today the |
| 22 | +# workflow trusts the HTTPS endpoint at chapel-lang/chapel releases. Acceptable |
| 23 | +# for the harness scaffold; harden before promoting Chapel to a production gate. |
| 24 | + |
| 25 | +name: chapel-ci |
| 26 | + |
| 27 | +on: |
| 28 | + push: |
| 29 | + branches: [main] |
| 30 | + paths: |
| 31 | + - 'chapel/**' |
| 32 | + - 'Justfile' |
| 33 | + - '.github/workflows/chapel-ci.yml' |
| 34 | + - 'src/main.rs' |
| 35 | + - 'src/types.rs' |
| 36 | + - 'Cargo.toml' |
| 37 | + - 'Cargo.lock' |
| 38 | + pull_request: |
| 39 | + paths: |
| 40 | + - 'chapel/**' |
| 41 | + - 'Justfile' |
| 42 | + - '.github/workflows/chapel-ci.yml' |
| 43 | + - 'src/main.rs' |
| 44 | + - 'src/types.rs' |
| 45 | + - 'Cargo.toml' |
| 46 | + - 'Cargo.lock' |
| 47 | + |
| 48 | +permissions: |
| 49 | + contents: read |
| 50 | + |
| 51 | +concurrency: |
| 52 | + group: chapel-ci-${{ github.workflow }}-${{ github.ref }} |
| 53 | + cancel-in-progress: true |
| 54 | + |
| 55 | +env: |
| 56 | + CHAPEL_VERSION: "2.8.0" |
| 57 | + CHAPEL_DEB_URL: "https://github.com/chapel-lang/chapel/releases/download/2.8.0/chapel-2.8.0-1.ubuntu22.amd64.deb" |
| 58 | + |
| 59 | +jobs: |
| 60 | + chapel-parse-check: |
| 61 | + name: chapel-parse-check |
| 62 | + runs-on: ubuntu-22.04 |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 65 | + - name: Install just |
| 66 | + run: sudo apt-get update -qq && sudo apt-get install -y just |
| 67 | + - name: Install Chapel ${{ env.CHAPEL_VERSION }} |
| 68 | + run: | |
| 69 | + set -euo pipefail |
| 70 | + curl -fsSL --retry 3 -o /tmp/chapel.deb "${{ env.CHAPEL_DEB_URL }}" |
| 71 | + sudo apt-get install -y /tmp/chapel.deb |
| 72 | + chpl --version |
| 73 | + - name: Parse every Chapel module |
| 74 | + run: just chapel-parse-check |
| 75 | + |
| 76 | + chapel-build: |
| 77 | + name: chapel-build |
| 78 | + needs: chapel-parse-check |
| 79 | + runs-on: ubuntu-22.04 |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 82 | + - name: Install just |
| 83 | + run: sudo apt-get update -qq && sudo apt-get install -y just |
| 84 | + - name: Install Chapel ${{ env.CHAPEL_VERSION }} |
| 85 | + run: | |
| 86 | + set -euo pipefail |
| 87 | + curl -fsSL --retry 3 -o /tmp/chapel.deb "${{ env.CHAPEL_DEB_URL }}" |
| 88 | + sudo apt-get install -y /tmp/chapel.deb |
| 89 | + chpl --version |
| 90 | + - name: Build mass-panic + smoke (no toolbox) |
| 91 | + run: just chapel-build-ci |
| 92 | + - name: Upload Chapel artefacts |
| 93 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
| 94 | + with: |
| 95 | + name: chapel-binaries |
| 96 | + path: | |
| 97 | + chapel/mass-panic |
| 98 | + chapel/smoke/two_repo_smoke |
| 99 | + retention-days: 1 |
| 100 | + |
| 101 | + chapel-smoke: |
| 102 | + name: chapel-smoke |
| 103 | + needs: chapel-build |
| 104 | + runs-on: ubuntu-22.04 |
| 105 | + steps: |
| 106 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 107 | + - name: Install Chapel ${{ env.CHAPEL_VERSION }} |
| 108 | + run: | |
| 109 | + set -euo pipefail |
| 110 | + curl -fsSL --retry 3 -o /tmp/chapel.deb "${{ env.CHAPEL_DEB_URL }}" |
| 111 | + sudo apt-get install -y /tmp/chapel.deb |
| 112 | + - name: Download Chapel artefacts |
| 113 | + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 114 | + with: |
| 115 | + name: chapel-binaries |
| 116 | + path: chapel/ |
| 117 | + - name: Restore exec bits |
| 118 | + run: chmod +x chapel/mass-panic chapel/smoke/two_repo_smoke |
| 119 | + - name: Run two_repo_smoke |
| 120 | + run: ./chapel/smoke/two_repo_smoke |
| 121 | + |
| 122 | + chapel-e2e: |
| 123 | + name: chapel-e2e |
| 124 | + needs: chapel-build |
| 125 | + runs-on: ubuntu-22.04 |
| 126 | + steps: |
| 127 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 128 | + - name: Install just + Chapel ${{ env.CHAPEL_VERSION }} |
| 129 | + run: | |
| 130 | + set -euo pipefail |
| 131 | + sudo apt-get update -qq && sudo apt-get install -y just |
| 132 | + curl -fsSL --retry 3 -o /tmp/chapel.deb "${{ env.CHAPEL_DEB_URL }}" |
| 133 | + sudo apt-get install -y /tmp/chapel.deb |
| 134 | + - name: Download Chapel artefacts |
| 135 | + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 136 | + with: |
| 137 | + name: chapel-binaries |
| 138 | + path: chapel/ |
| 139 | + - name: Restore exec bits |
| 140 | + run: chmod +x chapel/mass-panic |
| 141 | + - name: End-to-end -nl 1 exercise |
| 142 | + run: just chapel-e2e |
| 143 | + |
| 144 | + chapel-cli-contract: |
| 145 | + name: chapel-cli-contract |
| 146 | + runs-on: ubuntu-22.04 |
| 147 | + steps: |
| 148 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 149 | + - uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable |
| 150 | + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 |
| 151 | + with: |
| 152 | + path: | |
| 153 | + ~/.cargo/registry |
| 154 | + ~/.cargo/git |
| 155 | + target |
| 156 | + key: ${{ runner.os }}-cargo-chapel-cli-contract-${{ hashFiles('Cargo.lock') }} |
| 157 | + - name: Build panic-attack |
| 158 | + run: cargo build --release --locked |
| 159 | + - name: Run contract gate |
| 160 | + run: ./chapel/tests/contract_check.sh |
| 161 | + |
| 162 | + chapel-rust-diff: |
| 163 | + name: chapel-rust-diff |
| 164 | + needs: chapel-build |
| 165 | + runs-on: ubuntu-22.04 |
| 166 | + steps: |
| 167 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 168 | + - uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable |
| 169 | + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 |
| 170 | + with: |
| 171 | + path: | |
| 172 | + ~/.cargo/registry |
| 173 | + ~/.cargo/git |
| 174 | + target |
| 175 | + key: ${{ runner.os }}-cargo-chapel-rust-diff-${{ hashFiles('Cargo.lock') }} |
| 176 | + - name: Install Chapel ${{ env.CHAPEL_VERSION }} |
| 177 | + run: | |
| 178 | + set -euo pipefail |
| 179 | + curl -fsSL --retry 3 -o /tmp/chapel.deb "${{ env.CHAPEL_DEB_URL }}" |
| 180 | + sudo apt-get install -y /tmp/chapel.deb |
| 181 | + - name: Download Chapel artefacts |
| 182 | + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 183 | + with: |
| 184 | + name: chapel-binaries |
| 185 | + path: chapel/ |
| 186 | + - name: Restore exec bits |
| 187 | + run: chmod +x chapel/mass-panic |
| 188 | + - name: Build panic-attack |
| 189 | + run: cargo build --release --locked |
| 190 | + - name: rayon vs Chapel single-locale aggregate parity |
| 191 | + run: ./chapel/tests/rayon_vs_chapel_diff.sh |
0 commit comments