-
-
Notifications
You must be signed in to change notification settings - Fork 122
45 lines (37 loc) · 1.2 KB
/
nix.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
name: Nix CI
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
nix-build:
strategy:
matrix:
os: [ubuntu-latest]
chatType: [basic, webkit, webengine]
runs-on: ${{ matrix.os }}
steps:
- name: Checking out and fetching submodules
uses: actions/checkout@v2.4.0
with:
submodules: recursive
- name: Install Nix
uses: cachix/install-nix-action@v15
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
system-features = nixos-test benchmark big-parallel kvm
- name: Nix build for “${{ matrix.chatType }}” chat type on ${{ matrix.os }}
run: |
ver=$(git tag --contains "$(git rev-parse @)" | head -1)
if [[ -z $ver ]]; then ver=git-$(git rev-parse --short @); fi
nix-build \
--argstr version "$ver" \
--argstr chatType ${{ matrix.chatType }} \
-o result-ci-test-"$ver"-${{ matrix.chatType }}-built-on-${{ matrix.os }}
# Final check
set -o xtrace
[[ -x result-ci-test-"$ver"-${{ matrix.chatType }}-built-on-${{ matrix.os }}/bin/psi ]]