From 81c8a1ce182a63f53c3b6234e9b2e9c7c80f6927 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Tue, 26 Mar 2024 14:04:50 -0600 Subject: [PATCH] Add cargo build github workflow Signed-off-by: David Mulder --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..16ad40e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +--- +name: Build + +# Trigger the workflow on push or pull request +"on": + push: + branches-ignore: + - main + pull_request: + +env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.4 + with: + version: "v0.4.2" + - name: Install dependencies + run: | + sudo apt-get update && \ + sudo apt-get install -y \ + libpam0g-dev \ + libudev-dev \ + libssl-dev \ + pkg-config \ + tpm-udev \ + libtss2-dev + + - name: "Run build" + run: cargo build --all-features --all-targets + continue-on-error: false