Initial commit #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: Cache to Cachix | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- package.nix | |
- flake.lock | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install QEMU | |
run: | | |
sudo apt update | |
sudo apt install -y qemu-user-static qemu-system-aarch64 | |
sudo usermod -aG kvm $USER | |
- uses: cachix/install-nix-action@v26 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.11 | |
extra_nix_config: | | |
extra-platforms = aarch64-linux | |
extra-system-features = nixos-test kvm | |
- name: Setup Cachix | |
uses: cachix/cachix-action@v14 | |
with: | |
name: hysteria | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Build x86_64-linux | |
run: nix build .#packages.x86_64-linux.default | |
- name: Build aarch64-linux | |
run: nix build .#packages.aarch64-linux.default | |