Files
firezone/.github/workflows/_rust.yml
dependabot[bot] 9e9be3de66 build(deps): bump taiki-e/install-action from 2.50.4 to 2.52.2 (#9277)
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.50.4 to 2.52.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.52.2</h2>
<ul>
<li>Update <code>mdbook@latest</code> to 0.4.51.</li>
</ul>
<h2>2.52.1</h2>
<ul>
<li>
<p>Update <code>taplo@latest</code> to 0.10.0.</p>
</li>
<li>
<p>Update <code>mdbook@latest</code> to 0.4.50.</p>
</li>
<li>
<p>Update <code>deepsource@latest</code> to 0.9.0.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.3.0.</p>
</li>
</ul>
<h2>2.52.0</h2>
<ul>
<li>
<p>Support <code>trivy</code>. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/970">#970</a>,
thanks <a
href="https://github.com/jayvdb"><code>@​jayvdb</code></a>)</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.26.1.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.69.3.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.2.8.</p>
</li>
</ul>
<h2>2.51.3</h2>
<ul>
<li>
<p>Update <code>wasmtime@latest</code> to 33.0.0.</p>
</li>
<li>
<p>Update <code>cargo-tarpaulin@latest</code> to 0.32.7.</p>
</li>
<li>
<p>Update <code>espup@latest</code> to 0.15.1.</p>
</li>
<li>
<p>Update <code>dprint@latest</code> to 0.50.0.</p>
</li>
</ul>
<h2>2.51.2</h2>
<ul>
<li>
<p>Update <code>syft@latest</code> to 1.25.1.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.135.</p>
</li>
</ul>
<h2>2.51.1</h2>
<ul>
<li>
<p>Update <code>syft@latest</code> to 1.25.0.</p>
</li>
<li>
<p>Update <code>cargo-binstall@latest</code> to 1.12.5.</p>
</li>
</ul>
<h2>2.51.0</h2>
<ul>
<li>
<p>Support <code>cargo-shear</code>. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/962">#962</a>,
thanks <a
href="https://github.com/vivienm"><code>@​vivienm</code></a>)</p>
</li>
<li>
<p>Update <code>grcov@latest</code> to 0.10.0.</p>
</li>
<li>
<p>Update <code>cargo-nextest@latest</code> to 0.9.96.</p>
</li>
<li>
<p>Update <code>protoc@latest</code> to 3.31.0.</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.24.0.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.52.2] - 2025-05-27</h2>
<ul>
<li>Update <code>mdbook@latest</code> to 0.4.51.</li>
</ul>
<h2>[2.52.1] - 2025-05-25</h2>
<ul>
<li>
<p>Update <code>taplo@latest</code> to 0.10.0.</p>
</li>
<li>
<p>Update <code>mdbook@latest</code> to 0.4.50.</p>
</li>
<li>
<p>Update <code>deepsource@latest</code> to 0.9.0.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.3.0.</p>
</li>
</ul>
<h2>[2.52.0] - 2025-05-22</h2>
<ul>
<li>
<p>Support <code>trivy</code>. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/970">#970</a>,
thanks <a
href="https://github.com/jayvdb"><code>@​jayvdb</code></a>)</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.26.1.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.69.3.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.2.8.</p>
</li>
</ul>
<h2>[2.51.3] - 2025-05-20</h2>
<ul>
<li>
<p>Update <code>wasmtime@latest</code> to 33.0.0.</p>
</li>
<li>
<p>Update <code>cargo-tarpaulin@latest</code> to 0.32.7.</p>
</li>
<li>
<p>Update <code>espup@latest</code> to 0.15.1.</p>
</li>
<li>
<p>Update <code>dprint@latest</code> to 0.50.0.</p>
</li>
</ul>
<h2>[2.51.2] - 2025-05-18</h2>
<ul>
<li>Update <code>syft@latest</code> to 1.25.1.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="84c20235be"><code>84c2023</code></a>
Release 2.52.2</li>
<li><a
href="3e74d077d9"><code>3e74d07</code></a>
Update <code>mdbook@latest</code> to 0.4.51</li>
<li><a
href="6c6479b498"><code>6c6479b</code></a>
Release 2.52.1</li>
<li><a
href="fd087fdc9a"><code>fd087fd</code></a>
Update <code>taplo@latest</code> to 0.10.0</li>
<li><a
href="64cb046fe5"><code>64cb046</code></a>
Update <code>mdbook@latest</code> to 0.4.50</li>
<li><a
href="5de533f2e9"><code>5de533f</code></a>
Update <code>deepsource@latest</code> to 0.9.0</li>
<li><a
href="657fe8a2ad"><code>657fe8a</code></a>
Update cargo-sort manifest</li>
<li><a
href="27f9e86c40"><code>27f9e86</code></a>
Update <code>cargo-shear@latest</code> to 1.3.0</li>
<li><a
href="4be883217e"><code>4be8832</code></a>
codegen: Mark cargo-sort 2.0.0 and 2.0.1 broken for now</li>
<li><a
href="52039f2329"><code>52039f2</code></a>
Release 2.52.0</li>
<li>Additional commits viewable in <a
href="33734a1186...84c20235be">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.50.4&new-version=2.52.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 14:17:34 +00:00

180 lines
6.9 KiB
YAML

---
name: Rust
"on":
workflow_call:
defaults:
run:
working-directory: ./rust
permissions:
contents: "read"
id-token: "write"
# Never tolerate warnings. Duplicated in `_tauri.yml`
env:
RUSTFLAGS: "-Dwarnings --cfg tokio_unstable"
RUSTDOCFLAGS: "-D warnings"
jobs:
static-analysis:
name: static-analysis-${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
# TODO: https://github.com/rust-lang/cargo/issues/5220
runs-on: [ubuntu-22.04, macos-14, windows-2022]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-rust
id: setup-rust
- uses: ./.github/actions/setup-tauri-v2
timeout-minutes: 10
- uses: taiki-e/install-action@84c20235bedc3797c7e1ddf685c574a4a6c666da # v2.52.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tool: cargo-udeps,cargo-deny
- uses: taiki-e/install-action@84c20235bedc3797c7e1ddf685c574a4a6c666da # v2.52.2
if: ${{ runner.os == 'Linux' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tool: bpf-linker
- run: cargo clippy --all-targets --all-features ${{ steps.setup-rust.outputs.compile-packages }}
name: cargo clippy
shell: bash
- run: cargo doc --all-features --no-deps --document-private-items ${{ steps.setup-rust.outputs.compile-packages }}
name: cargo doc
shell: bash
- run: cargo fmt -- --check
- run: cargo +${{ steps.setup-rust.outputs.nightly_version }} udeps --all-targets --all-features ${{ steps.setup-rust.outputs.compile-packages }}
name: cargo udeps
- run: cargo deny check --hide-inclusion-graph --deny unnecessary-skip
shell: bash
test:
name: test-${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
# TODO: https://github.com/rust-lang/cargo/issues/5220
runs-on:
[
ubuntu-22.04,
ubuntu-24.04,
macos-13,
macos-14,
macos-15,
windows-2019,
windows-2022,
]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-rust
id: setup-rust
- uses: ./.github/actions/setup-tauri-v2
- uses: taiki-e/install-action@84c20235bedc3797c7e1ddf685c574a4a6c666da # v2.52.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tool: ripgrep
- uses: taiki-e/install-action@84c20235bedc3797c7e1ddf685c574a4a6c666da # v2.52.2
if: ${{ runner.os == 'Linux' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tool: bpf-linker
- name: "cargo test"
shell: bash
run: |
set -x
# First, run all tests.
cargo test --all-features ${{ steps.setup-rust.outputs.test-packages }} -- --include-ignored --nocapture
# Poor man's test coverage testing: Grep the generated logs for specific patterns / lines.
rg --count --no-ignore SendIcmpPacket $TESTCASES_DIR
rg --count --no-ignore SendUdpPacket $TESTCASES_DIR
rg --count --no-ignore SendTcpPayload $TESTCASES_DIR
rg --count --no-ignore SendDnsQueries $TESTCASES_DIR
rg --count --no-ignore "Packet for DNS resource" $TESTCASES_DIR
rg --count --no-ignore "Packet for CIDR resource" $TESTCASES_DIR
rg --count --no-ignore "Packet for Internet resource" $TESTCASES_DIR
rg --count --no-ignore "Performed IP-NAT46" $TESTCASES_DIR
rg --count --no-ignore "Performed IP-NAT64" $TESTCASES_DIR
rg --count --no-ignore "Truncating DNS response" $TESTCASES_DIR
rg --count --no-ignore "Destination is unreachable" $TESTCASES_DIR
rg --count --no-ignore "Forwarding query for DNS resource to corresponding site" $TESTCASES_DIR
env:
# <https://github.com/rust-lang/cargo/issues/5999>
# Needed to create tunnel interfaces in unit tests
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "sudo --preserve-env"
PROPTEST_VERBOSE: 0 # Otherwise the output is very long.
PROPTEST_CASES: ${{ runner.os == 'Windows' && '0' || '256' }} # Default is only 256. Windows is very slow in GitHub Actions, so only run the regression cases there.
CARGO_PROFILE_TEST_OPT_LEVEL: 1 # Otherwise the tests take forever.
TESTCASES_DIR: "connlib/tunnel/testcases"
# Runs the Tauri client smoke test, built in debug mode. We can't run it in release
# mode because of a known issue: <https://github.com/firezone/firezone/blob/456e044f882c2bb314e19cc44c0d19c5ad817b7c/rust/windows-client/src-tauri/src/client.rs#L162-L164>
gui-smoke-test:
name: gui-smoke-test-${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022]
runs-on: ${{ matrix.runs-on }}
defaults:
run:
# Must be in this dir for `pnpm` to work
working-directory: ./rust/gui-client
# The Windows client ignores RUST_LOG because it uses a settings file instead
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-tauri-v2
timeout-minutes: 10
with:
runtime: true
- run: pnpm install
- run: pnpm vite build
- name: Build client
run: cargo build -p firezone-gui-client --all-targets
- uses: taiki-e/install-action@84c20235bedc3797c7e1ddf685c574a4a6c666da # v2.52.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tool: dump_syms
- name: Run smoke test
working-directory: ./rust
run: cargo run -p gui-smoke-test
timeout-minutes: 2
headless-client:
name: headless-client-${{ matrix.test }}-${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- { runs-on: windows-2019, test: token-path-windows.ps1 }
- { runs-on: windows-2022, test: token-path-windows.ps1 }
- { runs-on: ubuntu-22.04, test: linux-group.sh }
- { runs-on: ubuntu-24.04, test: linux-group.sh }
- { runs-on: ubuntu-22.04, test: token-path-linux.sh }
- { runs-on: ubuntu-24.04, test: token-path-linux.sh }
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-tauri-v2
timeout-minutes: 10
- run: scripts/tests/${{ matrix.test }}
name: "test script"
working-directory: ./