surrealpatch/.github/workflows/nix.yml
2023-03-08 10:41:34 +00:00

49 lines
1.3 KiB
YAML

name: Nix
on:
- pull_request
- push
jobs:
build-static:
name: Build static Linux binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: surrealdb
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- run: nix build .#static-binary
- run: ./result/bin/surreal help
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: surrealdb
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- run: nix build .#docker-image
- run: docker load --input ./result
build-native-linux:
name: Build native Linux binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: surrealdb
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- run: nix build .#x86_64-unknown-linux-gnu
- run: ./result/bin/surreal help