-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (58 loc) · 1.9 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI
on:
push:
branches:
- main
tags:
- v*.*.*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
include:
# - os: ubuntu-latest
# arch: x86_64-linux
# drv: "shared"
# - os: ubuntu-latest
# arch: x86_64-linux
# drv: "hyperscan"
# - os: ubuntu-latest
# arch: x86_64-linux
# drv: "vectorscan"
# - os: ubuntu-latest
# arch: aarch64-linux
# drv: "vectorscan"
- os: macos-11
arch: x86_64-darwin
drv: vectorscan
name: Nix - ${{ matrix.arch }}.${{ matrix.drv }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: cachix/install-nix-action@v22
- uses: cachix/cachix-action@v12
with:
name: pyperscan
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: setup emulation
if: ${{ matrix.arch == 'aarch64-linux' }}
run: |
sudo apt update
sudo apt install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
mkdir -p ~/.config/nix
echo "system-features = aarch64-linux arm-linux" | sudo tee -a /etc/nix/nix.conf
- name: Setup upterm session
uses: lhotari/action-upterm@v1
with:
limit-access-to-actor: true
- name: Build nix shell
run: |
nix build -L .#devShells.${{ matrix.arch }}.default --option system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }}
- name: Build nix package
run: nix build -L .?submodules=1#packages.${{ matrix.arch }}.default.${{ matrix.drv }} --option system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }}