mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 13:50:13 +00:00
try to cross-compile to aarch64 on gh action x86
This commit is contained in:
16
.github/workflows/flame.yml
vendored
16
.github/workflows/flame.yml
vendored
@ -20,11 +20,11 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
rebuild:
|
rebuild:
|
||||||
description: Whether or not to rebuild image
|
description: Rebuild Image
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
action:
|
action:
|
||||||
description: Which action to take with Terraform
|
description: Terraform Action
|
||||||
type: choice
|
type: choice
|
||||||
required: true
|
required: true
|
||||||
default: create
|
default: create
|
||||||
@ -40,7 +40,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
build-deploy:
|
build-deploy:
|
||||||
name: Build and Deploy
|
name: Build and Deploy
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo Code
|
- name: Checkout Repo Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -56,16 +56,22 @@ jobs:
|
|||||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
sudo udevadm control --reload-rules
|
sudo udevadm control --reload-rules
|
||||||
sudo udevadm trigger --name-match=kvm
|
sudo udevadm trigger --name-match=kvm
|
||||||
|
sudo apt-get install -y qemu-user-static
|
||||||
|
|
||||||
# Install Nix
|
# Install Nix
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
if: inputs.rebuild && inputs.action != 'destroy'
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
uses: cachix/install-nix-action@v17
|
uses: cachix/install-nix-action@v31.4.1
|
||||||
|
with:
|
||||||
|
enable_kvm: true
|
||||||
|
extra_nix_config: |
|
||||||
|
system = aarch64-linux
|
||||||
|
system-features = aarch64-linux arm-linux kvm
|
||||||
|
|
||||||
# Build the image
|
# Build the image
|
||||||
- name: Build Image
|
- name: Build Image
|
||||||
if: inputs.rebuild && inputs.action != 'destroy'
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
run: nix build .#flame-qcow
|
run: nix build .#flame-qcow --system aarch64-linux
|
||||||
|
|
||||||
- name: List Images
|
- name: List Images
|
||||||
if: inputs.rebuild && inputs.action != 'destroy'
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
|
Reference in New Issue
Block a user