From 97a4cc1ca3d900113d98da6db0b51254427394dd Mon Sep 17 00:00:00 2001 From: "Shawn T. Amundson" Date: Wed, 22 Mar 2023 08:25:15 -0500 Subject: [PATCH] Add just-based github build action This action uses just to lint, build, and unit test the rust code. Signed-off-by: Shawn T. Amundson --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 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 0000000000..6a39d073ca --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: Build + +on: + pull_request: + branches: [ 1-3 ] + push: + branches: [ 1-3 ] + schedule: + - cron: "0 10 * * *" + +env: + CARGO_TERM_COLOR: always + +concurrency: + group: "${{ github.ref }}-${{ github.workflow }}" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Print rustc version + run: rustc --version + - name: Install wasm32-unknown-unknown + run: rustup target add wasm32-unknown-unknown + - name: Install apt packages + run: sudo apt install -y libzmq3-dev + - name: Install Just + run: sudo snap install --edge --classic just + - name: Install protoc + run: | + curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip + unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 + rm protoc-3.5.1-linux-x86_64.zip + - name: Lint + run: PATH=$PATH:$(pwd)/protoc3/bin just lint + - name: Build + run: PATH=$PATH:$(pwd)/protoc3/bin just build + - name: Test + run: PATH=$PATH:$(pwd)/protoc3/bin just test