forked from kclejeune/system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
executable file
·141 lines (130 loc) · 4.72 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
env:
CACHIX_AUTH_TOKEN: ENCRYPTED[1f927911bd4beb6def00da2d175c2915e9a0fc65fbea36b6d8a3e45b7306c49065882246cd4cd1ca65e0e8f494ce1b18]
CACHIX_USER: bri
CIRRUS_SHELL: bash -il
DARWIN_BUILD_IMAGE: ghcr.io/cirruslabs/macos-ventura-base:latest
UPLOAD_SSH_KEY: ENCRYPTED[011e9ea66a3f9ec554f3c324d2213ab5ad0caa889120f604c7c22e39d7faaca07505b7abaeb1a0596700d3a5f7ac58c6]
GITHUB_TOKEN: ENCRYPTED[764faa3c531242a46d8a72bd72658b4e25fdb47b10f585818ccea114430a87428b8f5e02a410e6937190e230e1665a38]
LINUX_BUILD_IMAGE: nixos/nix:latest
NIX_INSTALLER_NO_CONFIRM: "true"
NIX_INSTALLER_TAG: v0.16.1
NIX_INSTALLER_EXTRA_CONF: |
access-tokens = github.com=${GITHUB_TOKEN}
substituters = https://cache.nixos.org https://bri.cachix.org https://devenv.cachix.org https://perchnet.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= bri.cachix.org-1:/dk2nWYOEZl/BnC8h5CTKgao5HeWjCIgY1Tuj29Bq4s= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= perchnet.cachix.org-1:0mwmOwJFqL+r4HKl68GZ90ATTFsi3/L4ejSUIWaYYmc=
trusted-users = root admin @sudo @wheel
build_template: &BUILD_TEMPLATE
name: Check_${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 github:nixos/nixpkgs/nixpkgs-unstable#cachix --impure && cachix use $CACHIX_USER
flake_check_script: nix flake check -j auto --system ${ARCH//arm/aarch}-${CIRRUS_OS} --impure --show-trace --accept-flake-config
#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_image_template: &BUILD_IMAGE_TEMPLATE
name: build_image_${TARGET}@${ARCH}-${CIRRUS_OS}_${FORMAT}
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_TAG != "" || $CIRRUS_PR != "" || $CIRRUS_BUILD_SOURCE == ""
timeout_in: 120m
#install_cachix_script: nix profile install github:nixos/nixpkgs/nixpkgs-unstable#cachix --impure && cachix use $CACHIX_USER
build_image_script: ./build.sh BUILD_AND_UPLOAD
specs_template: &SPECS
image: $LINUX_BUILD_IMAGE
cpu: 4
memory: 16G
kvm: true
linux_container_template: &LINUX_CONTAINER_TEMPLATE
container:
<<: *SPECS
arm_container_template: &ARM_CONTAINER_TEMPLATE
arm_container:
<<: *SPECS
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_TEMPLATE
# env:
# ARCH: arm64
# USER: root
- <<: *LINUX_CONTAINER_TEMPLATE
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
build_image_task:
matrix:
# - <<: *ARM_CONTAINER_TEMPLATE
# env:
# ARCH: arm64
# USER: root
# Proxmox server image
- <<: *LINUX_CONTAINER_TEMPLATE
env:
ARCH: x86_64
FORMAT: proxmox
DESTDIR: dump
EXT: vma.zst
TARGET: server
# raw server image
- <<: *LINUX_CONTAINER_TEMPLATE
env:
ARCH: x86_64
FORMAT: raw-efi
DESTDIR: images
EXT: img
TARGET: server
# iso server image
- <<: *LINUX_CONTAINER_TEMPLATE
env:
ARCH: x86_64
FORMAT: iso
DESTDIR: template/iso
EXT: iso
TARGET: server
# bri proxmox image
- <<: *LINUX_CONTAINER_TEMPLATE
env:
ARCH: x86_64
FORMAT: proxmox
DESTDIR: dump
EXT: vma.zst
TARGET: bri
# server lxc image (broken)
# - <<: *LINUX_CONTAINER_TEMPLATE
# env:
# ARCH: x86_64
# FORMAT: proxmox-lxc
# DESTDIR: template/cache
# EXT: tar.xz
# TARGET: server
# bri raw image
- <<: *LINUX_CONTAINER_TEMPLATE
env:
ARCH: x86_64
FORMAT: raw-efi
EXT: img
DESTDIR: images
TARGET: bri
# bri iso image
- <<: *LINUX_CONTAINER_TEMPLATE
env:
ARCH: x86_64
FORMAT: iso
EXT: iso
TARGET: bri
DESTDIR: template/iso
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_IMAGE_TEMPLATE