-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (118 loc) · 3.96 KB
/
Copy pathci.yaml
File metadata and controls
122 lines (118 loc) · 3.96 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
name: CI
on: # yamllint disable-line rule:truthy
workflow_dispatch:
workflow_call:
inputs:
skip_commit_validation:
description: >-
Skip the commit-subject check - it only makes sense pre-merge
(should this PR be mergeable), not as a post-merge gate.
required: false
type: boolean
default: false
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
steps:
-
uses: actions/checkout@v7
-
uses: erlef/setup-beam@v1
with:
otp-version: "29.0.3"
elixir-version: "1.20.3"
# Without this, setup-beam's problem matchers promote every
# compiler warning from deps (e.g. postgrex/rewrite's deprecated
# `xref: [exclude: ...]`, yamerl's deprecated `catch ...` syntax -
# both already at their latest published Hex versions, so not
# fixable from here) into noisy GH Actions annotations. See #9.
disable_problem_matchers: true
-
name: Cache deps/build
uses: actions/cache@v6
with:
path: |
app/deps
app/_build
key: ${{ runner.os }}-mix-${{ hashFiles('app/mix.lock') }}
-
# mix ci covers: deps.get, hex.audit, deps.audit (Elixir security
# advisories), format --check-formatted, credo (static analysis),
# usage_rules.sync --check (catches dep-bump drift, see #79),
# and mix test. Runs from the repo root; cd: app/ is handled
# inside the task itself.
run: mix ci
working-directory: .
burrito_linux_regression:
# ci.yaml is also called by main.yaml after pushes and closed release PRs.
# Keep this expensive native build as a pre-merge pull-request gate; the
# release workflow builds every target after the release PR merges.
if: github.event_name == 'pull_request' && github.event.action != 'closed'
name: Burrito Linux shared-loader regression
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: app
shell: bash
steps:
-
uses: actions/checkout@v7
-
uses: erlef/setup-beam@v1
with:
otp-version: "29.0.3"
elixir-version: "1.20.3"
disable_problem_matchers: true
-
uses: mlugg/setup-zig@v2.2.1
with:
version: "0.16.0"
-
run: mix deps.get
-
name: Compile makeup_syntect with its host NIF
env:
MIX_ENV: prod
run: mix deps.compile castore rustler_precompiled makeup_syntect
-
name: Pre-compile mdex_native with its musl NIF
env:
MIX_ENV: prod
TARGET_ABI: musl
run: mix deps.compile mdex_native
-
name: Install and repair the musl NIFs
run: ../ci/prepare_musl_nifs.sh
-
name: Build the native linux_x86_64 target
run: MIX_ENV=prod BURRITO_TARGET=linux_x86_64 mix release lc
-
name: Test the packaged binary across users
timeout-minutes: 2
run: ../ci/test_burrito_shared_loader.sh ./burrito_out/lc_linux_x86_64
conventional_commits:
if: inputs.skip_commit_validation != true
name: Validate Commit Subjects
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v7
with:
fetch-depth: 0
# pull_request's default ref is the synthetic refs/pull/N/merge test-merge
# commit (subject "Merge <sha> into <sha>"), not the PR branch tip - check
# out the real head SHA instead so that commit is never in the validated
# range. Falls back to github.sha for non-PR triggers (workflow_dispatch/
# workflow_call), where github.event.pull_request is unset.
ref: ${{ github.event.pull_request.head.sha || github.sha }}
-
env:
FETCH_BASE_REF: "true"
run: ./ci/conventional_commits.sh