on: workflow_call: jobs: rust: runs-on: ubuntu-22.04 steps: - name: checkout uses: actions/checkout@v3 - name: install rust run: | curl https://sh.rustup.rs -sSf | sh -s -- -y rustup target add x86_64-unknown-linux-gnu - name: cache rust uses: Swatinem/rust-cache@v2 with: key: rust_linux_cross - name: cargo build run: cargo build --target x86_64-unknown-linux-gnu --release - name: strip binary run: strip target/x86_64-unknown-linux-gnu/release/router - name: compress run: ./target/x86_64-unknown-linux-gnu/release/compress ./target/x86_64-unknown-linux-gnu/release/router ./router.tar.gz - name: upload artifact uses: actions/upload-artifact@v3 with: name: router-linux path: target/x86_64-unknown-linux-gnu/release/router