2022-10-04 16:32:44 +00:00
|
|
|
name: Nix
|
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
on: push
|
2022-10-04 16:32:44 +00:00
|
|
|
|
2023-03-30 20:14:06 +00:00
|
|
|
# Setting the shell option, it will run 'bash --noprofile --norc -eo pipefail {0}'
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2022-10-04 16:32:44 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
build-static:
|
|
|
|
name: Build static Linux binary
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-12-26 14:14:05 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-08 10:41:34 +00:00
|
|
|
- uses: cachix/install-nix-action@v20
|
2022-12-26 14:14:05 +00:00
|
|
|
- uses: cachix/cachix-action@v12
|
2022-10-04 16:32:44 +00:00
|
|
|
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:
|
2022-12-26 14:14:05 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-08 10:41:34 +00:00
|
|
|
- uses: cachix/install-nix-action@v20
|
2022-12-26 14:14:05 +00:00
|
|
|
- uses: cachix/cachix-action@v12
|
2022-10-04 16:32:44 +00:00
|
|
|
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:
|
2022-12-26 14:14:05 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-08 10:41:34 +00:00
|
|
|
- uses: cachix/install-nix-action@v20
|
2022-12-26 14:14:05 +00:00
|
|
|
- uses: cachix/cachix-action@v12
|
2022-10-04 16:32:44 +00:00
|
|
|
with:
|
|
|
|
name: surrealdb
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
extraPullNames: nix-community
|
|
|
|
- run: nix build .#x86_64-unknown-linux-gnu
|
|
|
|
- run: ./result/bin/surreal help
|