-
Notifications
You must be signed in to change notification settings - Fork 43
/
.cirrus.yml
56 lines (52 loc) · 2.26 KB
/
.cirrus.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
env:
CACHIX_AUTH_TOKEN: ENCRYPTED[!f0f7fdb6a0c000065b7755062731ff7916cee8f510c95478d629e76a2c03604cfe46fe2ec4e74a4128ad0a0aea6d57e7!]
CACHIX_USER: kclejeune
CIRRUS_SHELL: bash -il
DARWIN_BUILD_IMAGE: ghcr.io/cirruslabs/macos-runner:sonoma
GITHUB_TOKEN: ENCRYPTED[!c4841aa1f80b4c94abe2742b4cf2cc998e9b7bbc4d1fa182abb50636b09272b6062bcd2be016a597c225e3715f784969!]
LINUX_BUILD_IMAGE: nixos/nix:latest
NIX_INSTALLER_NO_CONFIRM: "true"
NIX_INSTALLER_TAG: "v0.19.1"
NIX_INSTALLER_EXTRA_CONF: |
access-tokens = github.com=${GITHUB_TOKEN}
substituters = https://cache.nixos.org https://kclejeune.cachix.org https://devenv.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= kclejeune.cachix.org-1:fOCrECygdFZKbMxHClhiTS6oowOkJ/I/dh9q9b1I4ko= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
trusted-users = root admin @sudo @wheel
build_template: &BUILD_TEMPLATE
name: build_${CIRRUS_OS}_${ARCH}
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_TAG != "" || $CIRRUS_PR != "" || $CIRRUS_BUILD_SOURCE == ""
timeout_in: 120m
install_cachix_script: nix profile install --impure --accept-flake-config nixpkgs#cachix
configure_cachix_script: cachix use $CACHIX_USER
flake_check_script: cachix watch-exec $CACHIX_USER -- nix flake check -j auto --system ${ARCH//arm/aarch}-${CIRRUS_OS} --impure --show-trace --accept-flake-config
build_darwin_task:
macos_instance:
image: $DARWIN_BUILD_IMAGE
matrix:
- env:
ARCH: arm64
- env:
ARCH: x86_64
install_rosetta_script: softwareupdate --install-rosetta --agree-to-license
install_nix_script: curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
<<: *BUILD_TEMPLATE
build_linux_task:
matrix:
# - arm_container:
# image: $LINUX_BUILD_IMAGE
# cpu: 4
# memory: 16G
# env:
# ARCH: arm64
# USER: root
- container:
image: $LINUX_BUILD_IMAGE
cpu: 4
memory: 16G
env:
ARCH: x86_64
USER: root
configure_flake_script: |
echo "experimental-features = nix-command flakes" | tee -a /etc/nix/nix.conf
echo "$NIX_INSTALLER_EXTRA_CONF" | tee -a /etc/nix/nix.conf
<<: *BUILD_TEMPLATE