|
12 | 12 | jobs: |
13 | 13 | prebuild-agents: |
14 | 14 | name: Prebuild Agents |
| 15 | + if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/v') |
15 | 16 | runs-on: ubuntu-24.04 |
16 | 17 | steps: |
17 | 18 | - name: Checkout |
@@ -121,9 +122,99 @@ jobs: |
121 | 122 | shell: pwsh |
122 | 123 | run: just check |
123 | 124 |
|
| 125 | + check-main: |
| 126 | + name: Check - main - ${{ matrix.platform.os-name }} |
| 127 | + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' |
| 128 | + strategy: |
| 129 | + fail-fast: false |
| 130 | + matrix: |
| 131 | + platform: |
| 132 | + - os-name: Linux-x86_64 |
| 133 | + runs-on: ubuntu-24.04 |
| 134 | + target: x86_64-unknown-linux-musl |
| 135 | + - os-name: Linux-aarch64 |
| 136 | + runs-on: ubuntu-24.04-arm |
| 137 | + target: aarch64-unknown-linux-musl |
| 138 | + - os-name: macOS-x86_64 |
| 139 | + runs-on: macos-15-intel |
| 140 | + target: x86_64-apple-darwin |
| 141 | + - os-name: macOS-aarch64 |
| 142 | + runs-on: macos-26 |
| 143 | + target: aarch64-apple-darwin |
| 144 | + - os-name: Windows-x86_64 |
| 145 | + runs-on: windows-2025 |
| 146 | + target: x86_64-pc-windows-msvc |
| 147 | + - os-name: Windows-aarch64 |
| 148 | + runs-on: windows-11-arm |
| 149 | + target: aarch64-pc-windows-msvc |
| 150 | + runs-on: ${{ matrix.platform.runs-on }} |
| 151 | + steps: |
| 152 | + - name: Checkout |
| 153 | + uses: actions/checkout@v6 |
| 154 | + |
| 155 | + - name: Install Rust |
| 156 | + uses: dtolnay/rust-toolchain@stable |
| 157 | + with: |
| 158 | + components: rustfmt, clippy |
| 159 | + |
| 160 | + - name: Add musl targets |
| 161 | + run: rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl |
| 162 | + |
| 163 | + - name: Install just (Unix) |
| 164 | + if: runner.os != 'Windows' |
| 165 | + uses: taiki-e/install-action@v2 |
| 166 | + with: |
| 167 | + tool: just |
| 168 | + |
| 169 | + - name: Install just (Windows) |
| 170 | + if: runner.os == 'Windows' |
| 171 | + shell: pwsh |
| 172 | + run: choco install just -y |
| 173 | + |
| 174 | + - name: Install cargo-nextest |
| 175 | + uses: taiki-e/install-action@v2 |
| 176 | + with: |
| 177 | + tool: cargo-nextest |
| 178 | + |
| 179 | + - name: Set placeholder agent paths (Unix) |
| 180 | + if: runner.os != 'Windows' |
| 181 | + run: | |
| 182 | + echo "INTAR_AGENT_X86_64_PATH=$RUNNER_TEMP/intar-agent-x86_64" >> "$GITHUB_ENV" |
| 183 | + echo "INTAR_AGENT_AARCH64_PATH=$RUNNER_TEMP/intar-agent-aarch64" >> "$GITHUB_ENV" |
| 184 | +
|
| 185 | + - name: Set placeholder agent paths (Windows) |
| 186 | + if: runner.os == 'Windows' |
| 187 | + shell: pwsh |
| 188 | + run: | |
| 189 | + "INTAR_AGENT_X86_64_PATH=$env:RUNNER_TEMP\\intar-agent-x86_64" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 |
| 190 | + "INTAR_AGENT_AARCH64_PATH=$env:RUNNER_TEMP\\intar-agent-aarch64" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 |
| 191 | +
|
| 192 | + - name: Create placeholder agents (Unix) |
| 193 | + if: runner.os != 'Windows' |
| 194 | + run: | |
| 195 | + echo -n "PLACEHOLDER_AGENT_BINARY" > "$INTAR_AGENT_X86_64_PATH" |
| 196 | + echo -n "PLACEHOLDER_AGENT_BINARY" > "$INTAR_AGENT_AARCH64_PATH" |
| 197 | +
|
| 198 | + - name: Create placeholder agents (Windows) |
| 199 | + if: runner.os == 'Windows' |
| 200 | + shell: pwsh |
| 201 | + run: | |
| 202 | + "PLACEHOLDER_AGENT_BINARY" | Set-Content -NoNewline -Path $Env:INTAR_AGENT_X86_64_PATH |
| 203 | + "PLACEHOLDER_AGENT_BINARY" | Set-Content -NoNewline -Path $Env:INTAR_AGENT_AARCH64_PATH |
| 204 | +
|
| 205 | + - name: Run just check (Unix) |
| 206 | + if: runner.os != 'Windows' |
| 207 | + run: just check |
| 208 | + |
| 209 | + - name: Run just check (Windows) |
| 210 | + if: runner.os == 'Windows' |
| 211 | + shell: pwsh |
| 212 | + run: just check |
| 213 | + run: just check |
| 214 | + |
124 | 215 | build: |
125 | 216 | name: Build - ${{ matrix.platform.os-name }} |
126 | | - if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') |
| 217 | + if: startsWith(github.ref, 'refs/tags/v') |
127 | 218 | needs: prebuild-agents |
128 | 219 | env: |
129 | 220 | INTAR_AGENT_X86_64_PATH: ${{ github.workspace }}/prebuilt-agents/intar-agent-x86_64 |
|
0 commit comments