Skip to content

Commit

Permalink
Add cachix to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
justinrubek committed Sep 23, 2022
1 parent 9fa25a8 commit e47ef9c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- uses: abelfodil/protoc-action@v1
- name: Install nix
uses: cachix/install-nix-action@v15
with:
protoc-version: '21.5'
extra_nix_config: |
access-tokens = github=${{ github.token }}
# Taken from: https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- uses: actions/cache@v3
- name: configure cachix
uses: cachix/cachix-action@v10
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Configure toolchain
uses: dtolnay/rust-toolchain@stable

- name: Unit tests
run: cargo test

- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings
name: glaredb
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: run checks
run: nix flake check

# TODO: Add this under nix flake check?
- name: SQL Logic Tests
run: cargo run --bin slt_runner -- testdata/sqllogictests/*.slt
run: nix develop -c cargo run --bin slt_runner -- testdata/sqllogictests/*.slt
6 changes: 6 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
extra_nix_config: |
access-tokens = github=${{ github.token }}
- name: configure cachix
uses: cachix/cachix-action@v10
with:
name: glaredb
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
with:
Expand Down
1 change: 0 additions & 1 deletion flake-parts/devshell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
cocogitto
protobuf
gdb
miniserve
];

otherNativeBuildInputs = with pkgs; [pkgconfig openssl openssl.dev llvmPackages.bintools];
Expand Down

0 comments on commit e47ef9c

Please sign in to comment.