v1.2.3 #411
Workflow file for this run
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
on: | |
release: | |
types: [published] | |
push: | |
paths: | |
- crates/vsock-proxy/** | |
- shared/** | |
- .github/workflows/vsock-proxy.yml | |
- Cargo.lock | |
name: vsock-proxy | |
jobs: | |
check-proxy: | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.event.release.tag_name, 'vsock-proxy') || github.event_name == 'push' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install MUSL Tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y musl-tools | |
- uses: dtolnay/[email protected] | |
with: | |
components: clippy, rustfmt | |
targets: x86_64-unknown-linux-musl | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "vsock-proxy" | |
- name: Check project | |
run: cargo check -p vsock-proxy | |
- name: Check formatting | |
run: cargo fmt --check | |
- name: Clippy | |
uses: clechasseur/rs-clippy-check@v3 | |
with: | |
args: -p vsock-proxy -- -D warnings | |
test-proxy: | |
runs-on: ubuntu-latest | |
needs: [check-proxy] | |
if: ${{ contains(github.event.release.tag_name, 'vsock-proxy') || github.event_name == 'push' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install MUSL Tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y musl-tools | |
- uses: dtolnay/[email protected] | |
with: | |
targets: x86_64-unknown-linux-musl | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "vsock-proxy" | |
- name: Test vsock proxy | |
run: cargo test -p vsock-proxy | |
build-proxy: | |
runs-on: ubuntu-latest | |
needs: [check-proxy,test-proxy] | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install MUSL Tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y musl-tools | |
- uses: dtolnay/[email protected] | |
with: | |
targets: x86_64-unknown-linux-musl | |
- name: Compile proxy | |
run: cargo build -p vsock-proxy --release | |
- name: Upload proxy | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vsock-proxy | |
path: target/release/vsock-proxy | |
release-proxy: | |
runs-on: ubuntu-latest | |
needs: [check-proxy,test-proxy] | |
if: ${{ contains(github.event.release.tag_name, 'vsock-proxy') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install MUSL Tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y musl-tools | |
- uses: dtolnay/[email protected] | |
with: | |
targets: x86_64-unknown-linux-musl | |
- name: Publish vsock-proxy | |
run: cargo publish -p vsock-proxy | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} |