Files
firezone/.github/workflows/rust.yml
Thomas Eizinger f5fdd56812 relay: create channel bindings and relay data (#1618)
Here is a short demo:


[Relay](https://github.com/firezone/firezone/assets/5486389/c0199294-70ca-47b4-90ae-2c96428bdb56)

You can run this locally using the `./run_smoke_test.sh` shell-script.
It is not reliable enough yet to be used in CI but I used one if its
outputs to make a regression test.

---------

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-05-22 17:25:16 -07:00

53 lines
1.5 KiB
YAML

name: Rust CI
on:
pull_request:
paths:
- 'rust/**'
push:
branches:
- master
paths:
- 'rust/**'
# Cancel old workflow runs if new code is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust
steps:
- uses: actions/checkout@v2
# This implicitly triggers installation of the toolchain in the `rust-toolchain.toml` file.
# If we don't do this here, our cache action will compute a cache key based on the Rust version shipped on GitHub's runner which might differ from the one we use.
- run: rustup show
- uses: Swatinem/rust-cache@v2
- run: cargo fmt -- --check
- run: cargo doc --no-deps --document-private-items
env:
RUSTDOCFLAGS: "-D warnings"
- run: cargo clippy -- -D warnings
- run: cargo test
cross:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust
steps:
- uses: actions/checkout@v2
# This implicitly triggers installation of the toolchain in the `rust-toolchain.toml` file.
# If we don't do this here, our cache action will compute a cache key based on the Rust version shipped on GitHub's runner which might differ from the one we use.
- run: rustup show
- uses: Swatinem/rust-cache@v2
- run: rustup target add x86_64-unknown-linux-musl
- run: cargo build --bin relay --target x86_64-unknown-linux-musl