Skip to content

Commit

Permalink
try building image on cirrus
Browse files Browse the repository at this point in the history
  • Loading branch information
bri committed Feb 11, 2024
1 parent 5b8e81e commit b6ef3ff
Showing 1 changed file with 84 additions and 3 deletions.
87 changes: 84 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ build_template: &BUILD_TEMPLATE
install_cachix_script: nix profile install github:nixos/nixpkgs/nixpkgs-unstable#cachix --impure && 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_image_template: &BUILD_IMAGE_TEMPLATE
name: build_image_${TARGET}@${ARCH//arm/aarch}-${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: |
mkdir -p build
cachix watch-exec $CACHIX_USER -- nix build "github:b-/system#nixosConfigurations.${TARGET}@${ARCH//arm/aarch}-${CIRRUS_OS}.config.formats.${FORMAT}" --print-out-paths "build" --show-trace
binaries_artifacts:
path: "build/*"

build_darwin_task:
macos_instance:
image: $DARWIN_BUILD_IMAGE
Expand All @@ -33,6 +44,27 @@ build_darwin_task:
<<: *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

build_image_task:
matrix:
# - arm_container:
# image: $LINUX_BUILD_IMAGE
Expand All @@ -46,9 +78,58 @@ build_linux_task:
cpu: 4
memory: 16G
env:
ARCH: x86_64
USER: root
FORMAT: proxmox
EXT: vma.zst
TARGET: server
- container:
image: $LINUX_BUILD_IMAGE
cpu: 4
memory: 16G
env:
FORMAT: raw-efi
EXT: img
TARGET: server
- container:
image: $LINUX_BUILD_IMAGE
cpu: 4
memory: 16G
env:
FORMAT: iso
EXT: iso
TARGET: server
# - container:
# image: $LINUX_BUILD_IMAGE
# cpu: 4
# memory: 16G
# env:
# FORMAT: proxmox
# EXT: vma.zst
# TARGET: bri
- container:
image: $LINUX_BUILD_IMAGE
cpu: 4
memory: 16G
env:
FORMAT: proxmox-lxc
EXT: tar.xz
TARGET: server
- container:
image: $LINUX_BUILD_IMAGE
cpu: 4
memory: 16G
env:
FORMAT: raw-efi
EXT: img
TARGET: bri
- container:
image: $LINUX_BUILD_IMAGE
cpu: 4
memory: 16G
env:
FORMAT: iso
EXT: iso
TARGET: bri
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_TEMPLATE

0 comments on commit b6ef3ff

Please sign in to comment.