From a0c99c2a70c663b6124843b2856abe18d6d39c6c Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Sat, 21 Jan 2023 15:16:18 +0530 Subject: [PATCH] add GitHub CI Signed-off-by: Amneesh Singh --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a81d3ae --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: torana +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, macOS-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Git checkout + uses: actions/checkout@v3 + - name: Install nix + uses: cachix/install-nix-action@v18 + - name: Check formatting + run: nix develop -c cargo fmt --check + - name: Set up cache + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ matrix.os }}-torana-${{ hashFiles('**/Cargo.lock') }} + - name: Build + run: nix develop -c cargo build --release