himalaya/.github/workflows/test.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2024-04-18 20:06:24 +00:00
name: test
on:
push:
jobs:
test:
runs-on: ${{ matrix.os }}
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
2024-09-17 07:50:29 +00:00
uses: actions/checkout@v4
2024-04-18 20:06:24 +00:00
- 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 07:18:59 +00:00
- name: Cache Nix store
2024-09-17 05:59:23 +00:00
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
- name: Build release
2024-04-18 20:06:24 +00:00
run: |
nix build -L .#${{ matrix.target }}
2024-04-18 20:29:10 +00:00
nix run -L .#${{ matrix.target }} -- --version
2024-09-17 07:47:17 +00:00
- name: Upload release artifact (tarball)
uses: actions/upload-artifact@v4
with:
2024-09-17 07:47:17 +00:00
name: "himalaya.${{ matrix.target }}.tgz"
path: result/himalaya.tgz
- name: Upload release artifact (zip)
uses: actions/upload-artifact@v4
with:
name: "himalaya.${{ matrix.target }}.zip"
path: result/himalaya.zip