Repository navigation
56 lines (51 loc) · 1.58 KB
/
Copy pathemscripten.yml
File metadata and controls
56 lines (51 loc) · 1.58 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Emscripten
on:
push:
branches: [master]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
inputs:
harbormaster_build_target_phid:
required: true
type: string
phabricator_diff_id:
required: true
type: string
phabricator_revision_id:
required: true
type: string
staging_base_ref:
required: true
type: string
staging_diff_ref:
required: true
type: string
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout staged diff
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v3
with:
ref: ${{ inputs.staging_diff_ref }}
fetch-depth: 0
- name: Checkout normal ref
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
extra_nix_config: |
extra-substituters = https://comm.cachix.org
extra-trusted-public-keys = comm.cachix.org-1:70RF31rkmCEhQ9HrXA2uXcpqQKGcUK3TxLJdgcUCaA4=
- name: Build Emscripten artifacts
run: |
if ! nix develop --accept-flake-config --command \
bash -lc 'cd web && yarn build-db-wasm'; then
nix develop --accept-flake-config --command \
bash -lc 'cd web && yarn clean-db-wasm'
nix develop --accept-flake-config --command \
bash -lc 'cd web && yarn build-db-wasm'
fi
git diff --exit-code