-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.22 KB
/
deploy.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
name: deploy
on:
push:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install libopencv-dev
- name: Free Space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
- uses: actions/checkout@01aecccf739ca6ff86c0539fbc67a7a5007bbc81
- uses: cachix/install-nix-action@ebed63b0a20f20951a06a507ea1a1596bfce35b6
- run: |
$(nix-build --option max-jobs auto --option build-cores 0 \
--option substituters "https://cache.nixos.org https://static-haskell-nix.cachix.org" \
--option trusted-public-keys "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= \
static-haskell-nix.cachix.org-1:Q17HawmAwaM1/BfIxaEDKAxwTOyRVhPG5Ji9K3+FvUU=" \
--no-link -A fullBuildScript)
- run: |
echo "::set-env name=ART_NAME::$(find /nix/store/ | grep 'bin/hasscan' | tail -n 1 | cut -d'/' -f4)"
- uses: actions/upload-artifact@e7eefc491732c06d0ebbf4d4f49dcc25b4d2f3a8
with:
name: hasscan
path: /nix/store/${{env.ART_NAME}}