Repository navigation
97 lines (90 loc) · 2.83 KB
/
Copy pathconformance.yml
File metadata and controls
97 lines (90 loc) · 2.83 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
name: Conformance
on:
workflow_dispatch:
inputs:
go_ref:
description: "pwn (Go) branch, tag or SHA"
default: main
julia_ref:
description: "PWNModel.jl branch, tag or SHA"
default: main
spec_ref:
description: "model-spec branch, tag or SHA"
default: main
pull_request:
schedule:
# Nightly, to catch changes in the model repositories and the parameter
# docs. Without inputs, all repositories are checked out at their default
# branch.
- cron: '0 3 * * *'
jobs:
conformance:
name: Go vs. Julia
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out conformance
uses: actions/checkout@v6
with:
path: conformance
- name: Check out pwn (Go)
uses: actions/checkout@v6
with:
repository: pwn-model/pwn
ref: ${{ inputs.go_ref }}
path: pwn
- name: Check out PWNModel.jl
uses: actions/checkout@v6
with:
repository: pwn-model/PWNModel.jl
ref: ${{ inputs.julia_ref }}
path: PWNModel.jl
- name: Check out model-spec
uses: actions/checkout@v6
with:
repository: pwn-model/model-spec
ref: ${{ inputs.spec_ref }}
path: model-spec
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
run: pip install pyyaml
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.27.x'
cache-dependency-path: pwn/go.sum
- name: Install Go model dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libgl1-mesa-dev xorg-dev xvfb
- name: Set up Julia
uses: julia-actions/setup-julia@v3
with:
version: '1'
- uses: julia-actions/cache@v3
- name: Install Julia model dependencies
run: julia --project=PWNModel.jl -e 'using Pkg; Pkg.instantiate()'
- name: Generate config from parameter docs
run: python conformance/scripts/params_to_config.py
- name: Run Go model
run: xvfb-run -a conformance/scripts/run_go.sh
- name: Run Julia model
run: conformance/scripts/run_julia.sh
- name: Compare outputs
run: python conformance/scripts/compare.py
- name: Check parameter docs
# Also when an earlier step failed, to report all problems at once.
if: ${{ !cancelled() }}
run: python conformance/scripts/check_params.py
- name: Upload outputs
if: always()
uses: actions/upload-artifact@v4
with:
name: conformance-output
path: |
conformance/out/default.yaml
conformance/out/go
conformance/out/julia