Try building for aarch64 #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: artifact | |
on: | |
push: | |
pull_request: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup caches | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Building tarball | |
run: nix build | |
- name: Uploading artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nixos-system-x86_64-linux.tar.xz | |
path: result/tarball/nixos-system-x86_64-linux.tar.xz | |
aarch64_job: | |
# The host should always be Linux | |
runs-on: ubuntu-latest | |
name: Build on ubuntu-latest aarch6 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Run commands | |
id: runcmd | |
with: | |
arch: aarch64 | |
distro: ubuntu22.04 | |
# Not required, but speeds up builds by storing container images in | |
# a GitHub package registry. | |
githubToken: ${{ github.token }} | |
# Set an output parameter `uname` for use in subsequent steps | |
run: | | |
uname -a | |
sh <(curl -L https://nixos.org/nix/install) | |
nix build | |
ls result/tarball/* | |
- name: Uploading artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nixos-system-x86_64-linux.tar.xz | |
path: result/tarball/nixos-system-x86_64-linux.tar.xz | |
- name: Get the output | |
# Echo the `uname` output parameter from the `runcmd` step | |
run: | | |
echo "The uname output was ${{ steps.runcmd.outputs.uname }}" |