2024-04-18 20:06:24 +00:00
|
|
|
name: test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
2024-09-17 05:59:23 +00:00
|
|
|
env:
|
|
|
|
CARGO_HOME: ~/.cargo
|
2024-04-18 20:06:24 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- target: x86_64-linux
|
|
|
|
os: ubuntu-latest
|
2024-04-18 20:29:10 +00:00
|
|
|
- target: aarch64-linux
|
2024-04-18 20:06:24 +00:00
|
|
|
os: ubuntu-latest
|
|
|
|
- target: x86_64-windows
|
|
|
|
os: ubuntu-latest
|
2024-04-18 20:42:11 +00:00
|
|
|
- target: x86_64-darwin
|
2024-09-04 09:38:46 +00:00
|
|
|
os: macos-13
|
|
|
|
- target: aarch64-darwin
|
|
|
|
os: macos-14
|
2024-04-18 20:06:24 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Nix
|
2024-09-04 09:38:46 +00:00
|
|
|
uses: cachix/install-nix-action@v27
|
2024-04-18 20:06:24 +00:00
|
|
|
with:
|
2024-09-04 09:38:46 +00:00
|
|
|
nix_path: nixpkgs=channel:nixos-24.05
|
|
|
|
enable_kvm: true
|
|
|
|
extra_nix_config: "experimental-features = nix-command flakes"
|
2024-09-17 05:59:23 +00:00
|
|
|
- name: Restore Nix store
|
|
|
|
uses: cachix/cachix-action@v15
|
2024-04-18 20:06:24 +00:00
|
|
|
with:
|
|
|
|
name: soywod
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
2024-09-04 09:38:46 +00:00
|
|
|
extraPullNames: nix-community
|
2024-09-17 04:46:57 +00:00
|
|
|
- name: Build release
|
2024-04-18 20:06:24 +00:00
|
|
|
run: |
|
2024-09-17 06:55:54 +00:00
|
|
|
nix build -L .#${{ matrix.target }}
|
2024-04-18 20:29:10 +00:00
|
|
|
nix run -L .#${{ matrix.target }} -- --version
|
2024-09-17 06:55:54 +00:00
|
|
|
cp result/himalaya.tgz result/himalaya.zip .
|
2024-09-17 04:46:57 +00:00
|
|
|
- name: Upload release artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: release
|
2024-09-17 04:55:02 +00:00
|
|
|
path: |
|
2024-09-17 06:22:19 +00:00
|
|
|
himalaya.tgz
|
|
|
|
himalaya.zip
|