Skip to content

Commit 59b5b1a

Browse files
committed
ci: combine check and build on main
1 parent d8e184e commit 59b5b1a

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

.github/workflows/ci-e2e.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848

4949
check:
5050
name: Check - ${{ matrix.platform.os-name }}
51+
if: github.event_name == 'pull_request'
5152
needs: prebuild-agents
5253
env:
5354
INTAR_AGENT_X86_64_PATH: ${{ github.workspace }}/prebuilt-agents/intar-agent-x86_64
@@ -118,7 +119,7 @@ jobs:
118119
shell: pwsh
119120
run: just check
120121

121-
cross-compile:
122+
build:
122123
name: Build - ${{ matrix.platform.os-name }}
123124
if: github.ref == 'refs/heads/main'
124125
needs: prebuild-agents
@@ -167,9 +168,36 @@ jobs:
167168

168169
- name: Install Rust
169170
uses: dtolnay/rust-toolchain@stable
171+
with:
172+
components: rustfmt, clippy
173+
174+
- name: Add targets
175+
run: rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl ${{ matrix.platform.target }}
176+
177+
- name: Install just
178+
if: runner.os != 'Windows'
179+
uses: taiki-e/install-action@v2
180+
with:
181+
tool: just
182+
183+
- name: Install just (Windows)
184+
if: runner.os == 'Windows'
185+
shell: pwsh
186+
run: choco install just -y
187+
188+
- name: Install cargo-nextest
189+
uses: taiki-e/install-action@v2
190+
with:
191+
tool: cargo-nextest
192+
193+
- name: Run just check (Unix)
194+
if: runner.os != 'Windows'
195+
run: just check
170196

171-
- name: Add target
172-
run: rustup target add ${{ matrix.platform.target }}
197+
- name: Run just check (Windows)
198+
if: runner.os == 'Windows'
199+
shell: pwsh
200+
run: just check
173201

174202
- name: Build binary
175203
uses: houseabsolute/actions-rust-cross@v1

0 commit comments

Comments
 (0)