-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, the ci steps were skipped for the Windows compilation target. This new approach runs the ci steps on a Windows machine. This is suboptimal for multiple reasons: * the `ci` script does not work on a machine. Thus, calls to the script are removed by this change. * our local workflow involves cross-compilation, and thus it is slightly different from github workflow * the release builds are currently built via cross-compilation The reason we can't use `ubuntu-latest` as a build machine is that the `cargo test` requires an interpreter for a `.exe` file.
- Loading branch information
1 parent
2531d30
commit f942086
Showing
3 changed files
with
22 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,41 +3,29 @@ name: CI | |
on: [push, pull_request] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
|
||
ci: | ||
runs-on: ${{ matrix.type.os }} | ||
name: ${{ matrix.type.target }} (${{ matrix.type.os }}) | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Rust formatting | ||
step: cargo-fmt-check | ||
- name: Rust linting | ||
step: cargo-clippy | ||
- name: Rust tests | ||
step: cargo-test | ||
|
||
type: | ||
- { os: windows-latest, target: x86_64-pc-windows-gnu } | ||
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu } | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
run: ./setup | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: ${{ matrix.name }} | ||
env: | ||
STEP: ${{ matrix.step }} | ||
run: ./ci "${STEP}" | ||
- name: "Setup Rust" | ||
uses: actions-rust-lang/[email protected] | ||
with: | ||
components: rustfmt, clippy | ||
target: ${{ matrix.type.target }} | ||
|
||
check_success: | ||
if: always() | ||
- run: cargo fmt -- --check | ||
working-directory: ${{ github.workspace }}/v2/robotmk/ | ||
|
||
needs: | ||
- linux | ||
- run: cargo test --all-targets --target ${{ matrix.type.target }} | ||
working-directory: ${{ github.workspace }}/v2/robotmk/ | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
- run: cargo clippy --all-targets --target ${{ matrix.type.target }} -- --deny warnings | ||
working-directory: ${{ github.workspace }}/v2/robotmk/ |
This file contains 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
This file contains 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