Skip to content

ARM64-Build

ARM64-Build #9

Workflow file for this run

name: ARM64-Build
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 3 * * 6' # every Saturday at 03:00 UTC
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix with KVM enabled
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
enable_kvm: true
extra_nix_config: |
extra-platforms = aarch64-linux
- name: Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Prepare host for ARM64 emulation
run: |
sudo apt -y install qemu-user-static
cat /proc/sys/fs/binfmt_misc/qemu-aarch64
/usr/bin/qemu-aarch64-static --version
- name: Connect to Tailscale network
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:gh
- name: Attic cache
uses: ryanccn/attic-action@v0
with:
endpoint: "http://atticd:8080"
cache: atro
token: ${{ secrets.ATTIC_TOKEN }}
- name: Build
run: |
# Updating flake lock
nix flake update
# Adding substituters and keys
export SUBS="$(nix show-config substituters) https://hyprland.cachix.org https://staging.attic.rs/attic-ci"
export SUBSKEYS="$(nix show-config trusted-public-keys) hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc= attic-ci:U5Sey4mUxwBXM3iFapmP0/ogODXywKLRNgRPQpEXxbo="
# Building
nix build .#nixosConfigurations.opi1.config.system.build.toplevel -L --substituters "$SUBS" --trusted-public-keys "$SUBSKEYS"
nix build .#nixosConfigurations.opi2.config.system.build.toplevel -L --substituters "$SUBS" --trusted-public-keys "$SUBSKEYS"
nix build .#nixosConfigurations.opi3.config.system.build.toplevel -L --substituters "$SUBS" --trusted-public-keys "$SUBSKEYS"
nix build .#nixosConfigurations.opi4.config.system.build.toplevel -L --substituters "$SUBS" --trusted-public-keys "$SUBSKEYS"