-
Notifications
You must be signed in to change notification settings - Fork 42
54 lines (45 loc) · 1.88 KB
/
ci_nix.yml
File metadata and controls
54 lines (45 loc) · 1.88 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
on:
pull_request:
workflow_dispatch:
# this cancels workflows currently in progress if you start a new one
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Do not add permissions here! Configure them at the job level!
permissions: {}
jobs:
build-and-test-nix:
strategy:
fail-fast: false
matrix:
# macos-15-intel uses x86-64 machine, macos-14 & 15 use aarch64
os: [macos-15-intel, macos-15, ubuntu-22.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# install nix
- uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # commit for v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # commit for v16
with:
name: enigmaticsunrise
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: print architecture
run: uname -m
- name: Run all tests
run: nix develop -c sh -c 'export ROC=roc && export EXAMPLES_DIR=./examples/ && ./ci/all_tests.sh'
- name: Run all tests with debug compiler
env:
RUST_BACKTRACE: 1
run: |
# use debug compiler
sed -i.bak 's/rocPkgs\.cli/rocPkgs.cli-debug/g' flake.nix
# make sure substitution was made
grep -q "rocPkgs.cli-debug" flake.nix
# docs does not work with debug compiler
sed -i.bak 's/\$ROC docs.*//g' ./ci/all_tests.sh
# for SINGLE_TAG_GLUE_CHECK_OFF=1 see github.com/roc-lang/basic-cli/issues/242
nix develop -c sh -c 'export SINGLE_TAG_GLUE_CHECK_OFF=1 && export ROC=roc && export EXAMPLES_DIR=./examples/ && ./ci/all_tests.sh'
- name: Check if jump-start script still works
run: nix develop -c sh -c 'export ROC=roc && bash ./jump-start.sh'