-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
107 lines (100 loc) · 3.55 KB
/
Copy pathtccbin_automation_contract.yml
File metadata and controls
107 lines (100 loc) · 3.55 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
name: TCC bundle automation contract
on:
pull_request:
merge_group:
permissions:
contents: read
concurrency:
group: tccbin-automation-contract-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
contract-worker:
name: Contract worker
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- name: Checkout the tested revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
fetch-depth: 0
persist-credentials: false
- name: Checkout the immutable VC bootstrap snapshot
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: vlang/vc
ref: dfc458a13ba8923ebc249e262c331f8169aa728b
path: vc
fetch-depth: 0
filter: blob:none
persist-credentials: false
- name: Configure the immutable VC bootstrap snapshot
run: git -C vc config --local core.autocrlf false
- name: Checkout the immutable TCC bootstrap bundle
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: vlang/tccbin
ref: ece46f06fbe6eb701d52442f11dd59c48d166cae
path: thirdparty/tcc
fetch-depth: 0
filter: blob:none
persist-credentials: false
- name: Configure and verify the immutable TCC bootstrap bundle
shell: bash
run: |
set -euo pipefail
git -C thirdparty/tcc config --local core.autocrlf false
test "$(git -C thirdparty/tcc rev-parse HEAD)" = "ece46f06fbe6eb701d52442f11dd59c48d166cae"
tcc_symbolic_ref_rc=0
git -C thirdparty/tcc symbolic-ref --quiet HEAD >/dev/null || tcc_symbolic_ref_rc=$?
test "$tcc_symbolic_ref_rc" -eq 1
tcc_status="$(git -C thirdparty/tcc status --porcelain --untracked-files=all)"
test -z "$tcc_status"
test "$(git -C thirdparty/tcc config --local --get core.autocrlf)" = "false"
test -x thirdparty/tcc/tcc.exe
test -f thirdparty/tcc/lib/libgc.a
thirdparty/tcc/tcc.exe --version
- name: Build the local compiler
run: |
make local=1
./v -o ./vnew cmd/v
- name: Validate schemas, fixtures, and pure control-plane models
run: |
./vnew -silent test thirdparty/tccbin_automation/tests/
./vnew run thirdparty/tccbin_automation/bin/cmd contract
contract:
name: tccbin-automation-contract
needs: contract-worker
if: always()
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require an exact successful worker result
env:
WORKER_RESULT: ${{ needs.contract-worker.result }}
run: test "$WORKER_RESULT" = success
dry-run-worker:
name: Dry-run worker
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout the tested revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Build the local compiler
run: |
make
./v -o ./vnew cmd/v
- name: Exercise the no-write execution path
run: ./vnew run thirdparty/tccbin_automation/bin/cmd dry-run
dry-run:
name: tccbin-automation-dry-run
needs: dry-run-worker
if: always()
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require an exact successful worker result
env:
WORKER_RESULT: ${{ needs.dry-run-worker.result }}
run: test "$WORKER_RESULT" = success