forked from srid/neuron
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.15 KB
/
ci.yaml
File metadata and controls
38 lines (38 loc) · 1.15 KB
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
name: "CI"
on:
pull_request:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v10
# This also runs nix-build.
- uses: cachix/cachix-action@v6
with:
name: srid
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# Only needed for private caches
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# This builds neuron, as well as run tests
- run: nix-build -j4 ci.nix
# macOS is not supported: https://github.com/matthewbauer/nix-bundle/issues/17
# if: github.ref == 'refs/heads/master'
- name: Bundle up
if: ${{ runner.os == 'Linux' }}
run: |
git clone https://github.com/srid/nix-bundle.git tmp/nix-bundle
cd tmp/nix-bundle
./nix-bundle.sh '(import ../.. {})' /bin/neuron > neuron
mkdir ~/bundle
cp neuron ~/bundle/neuron
chmod a+x ~/bundle/neuron
- uses: actions/upload-artifact@v2
if: ${{ runner.os == 'Linux' }}
with:
name: neuron-bundle-linux
path: ~/bundle/neuron