forked from amber-lang/amber
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 900 Bytes
/
nix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build verify Amber Nix
on:
push:
branches:
- master
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
nix_build:
name: Nix build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: bc
version: 1.0
- uses: cachix/install-nix-action@v27
- name: Check Nix flake
run: nix flake check --all-systems
- name: Build in Nix shell
run: nix develop --command cargo build --release
- name: Build with Nix
run: |
nix build
# Ensure that the `amber` binary runs
./result/bin/amber --version
# Ensure that the `bc` command is correctly provided
echo "\$which bc && bc --version\$ failed { echo \"Failed to run basic calculator\" exit(1) }" | ./result/bin/amber -