-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 2.33 KB
/
build.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: "Build parsec-cloud"
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
workflow_call:
inputs:
git_ref:
type: string
required: true
description: "Git ref to build (commit/branch/tag)"
default: ${{ github.sha }}
concurrency:
group: parsec-cloud-build-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
include:
- version: v3
build-timeout-minutes: 10
fail-fast: false
name: "Build parsec-cloud ${{ matrix.version }}"
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Update commit status
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
with:
status: pending
context: "Building parsec-cloud ${{ matrix.version }}"
sha: ${{ inputs.git_ref }}
timeout-minutes: 1
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
timeout-minutes: 1
- name: Install nix
uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 1
- name: Configure cachix
uses: cachix/cachix-action@v14
with:
name: parsec-cloud
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
timeout-minutes: 1
- name: Build parsec-cloud client
run: nix build .#parsec-cloud-${{ matrix.version }}-client
timeout-minutes: ${{ matrix.build-timeout-minutes }}
- name: Check flake
run: nix flake check
timeout-minutes: 1
- name: Update commit status to success
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
with:
status: success
context: "Building parsec-cloud ${{ matrix.version }}"
sha: ${{ inputs.git_ref }}
timeout-minutes: 1
- name: Update commit status to error
if: ${{ failure() }}
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
with:
status: error
context: "Building parsec-cloud ${{ matrix.version }}"
sha: ${{ inputs.git_ref }}
timeout-minutes: 1