mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-22 02:50:19 +00:00
2d53144c7c
Looks like cargo cache is inside the Nix store.
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
CARGO_HOME: ~/.cargo
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- target: x86_64-linux
|
|
os: ubuntu-latest
|
|
- target: aarch64-linux
|
|
os: ubuntu-latest
|
|
- target: x86_64-windows
|
|
os: ubuntu-latest
|
|
- target: x86_64-darwin
|
|
os: macos-13
|
|
- target: aarch64-darwin
|
|
os: macos-14
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v27
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-24.05
|
|
enable_kvm: true
|
|
extra_nix_config: "experimental-features = nix-command flakes"
|
|
- name: Restore Nix store
|
|
uses: cachix/cachix-action@v15
|
|
with:
|
|
name: soywod
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
extraPullNames: nix-community
|
|
- name: Build release
|
|
run: |
|
|
nix build -L .#${{ matrix.target }}
|
|
nix run -L .#${{ matrix.target }} -- --version
|
|
cp result/himalaya.tgz result/himalaya.zip .
|
|
- name: Upload release artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release
|
|
path: |
|
|
himalaya.tgz
|
|
himalaya.zip
|