Skip to content

Commit

Permalink
Add cross-compilation in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kotauskas committed Nov 23, 2024
1 parent 87215b8 commit 033ee88
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/checks_and_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,36 @@ jobs:

- name: Run rustdoc for Tokio configuration
run: cargo doc --features tokio --no-deps

xcompile:
strategy:
fail-fast: false
matrix:
target: [aarch64-linux-android, x86_64-unknown-freebsd]
toolchain: ["1.75.0", nightly]

name: ${{ matrix.toolchain }} on ${{ matrix.target }} (no tests)
runs-on: ubuntu-latest
env:
RUSTFLAGS: --cfg ci
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Install Rust
run: |
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --component clippy --no-self-update
rustup default ${{ matrix.toolchain }}
rustup target add ${{ matrix.target }}
- name: Run Clippy for default configuration
run: cargo clippy --target ${{ matrix.target }} -- -A unknown_lints

- name: Run rustdoc for default configuration
run: cargo doc --target ${{ matrix.target }} --no-deps

- name: Run Clippy for Tokio configuration
run: cargo clippy --target ${{ matrix.target }} --features tokio -- -A unknown_lints

- name: Run rustdoc for Tokio configuration
run: cargo doc --target ${{ matrix.target }} --features tokio --no-deps
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,22 @@ platform to be demoted, although promotions quite obviously can happen as minor
badge if anything is wrong on any of those systems
- Certain `#[cfg]`-gated platform-specific features are supported with stable public APIs

##### Explicit support with incomplete CI
*OSes at this level: **FreeBSD**, **Android***

- Interprocess is expected to compile and succeed in running all tests – it would be a bug for it
not to
- GitHub Actions only allows Clippy and Rustdoc to be run for those targets in CI (via
cross-compilation) due to a lack of native VMs
- Certain `#[cfg]`-gated platform-specific features are supported with stable public APIs

##### Explicit support without CI
*OSes at this level: **FreeBSD***
*OSes at this level: currently none*

- Interprocess is expected to compile and succeed in running all tests – it would be a bug for it
not to
- Manual testing on local VMs is usually done before every release; CI is not provided solely
because GitHub Actions selfishly ignores the existence of those wonderful systems
- Manual testing on local VMs is usually done before every release; no CI happens because those
targets' standard library `.rlib`s cannot be installed via `rustup target add`
- Certain `#[cfg]`-gated platform-specific features are supported with stable public APIs

##### Support by association
Expand Down

0 comments on commit 033ee88

Please sign in to comment.