-
Notifications
You must be signed in to change notification settings - Fork 147
163 lines (144 loc) · 5.42 KB
/
coq-opam-package.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Test opam package
# Note that we must split up each command into a separate step for Windows, because otherwise we don't get error code
# See also https://github.com/avsm/setup-ocaml/issues/72
on:
push:
branches:
- master
schedule:
- cron: '0 0 1 * *'
jobs:
install:
strategy:
fail-fast: false
matrix:
coq-version: ['dev', '8.19.0', '8.18.0']
os: [{name: 'Ubuntu',
runs-on: 'ubuntu-latest',
ocaml-compiler: '4.09.1',
coq-extra-flags: '',
extra-ocaml-repositories: '',
opam-jobs-flag: ''},
{name: 'macOS',
runs-on: 'macos-latest',
ocaml-compiler: '4.14.2',
coq-extra-flags: '',
extra-ocaml-repositories: '',
opam-jobs-flag: ''},
{name: 'Windows',
runs-on: 'windows-latest',
ocaml-compiler: '4.11.1',
coq-extra-flags: '-async-proofs-j 1',
extra-ocaml-repositories: 'opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset',
opam-jobs-flag: '-j 1'}]
runs-on: ${{ matrix.os.runs-on }}
env:
OPAMYES: "true"
steps:
- name: Set up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.os.ocaml-compiler }}
opam-repositories: |-
${{ matrix.os.extra-ocaml-repositories }}
default: https://github.com/ocaml/opam-repository.git
- name: echo Linux build params
run: |
echo "::group::lscpu"
lscpu
echo "::endgroup::"
echo "::group::uname -a"
uname -a
echo "::endgroup::"
echo "::group::lsb_release -a"
lsb_release -a
echo "::endgroup::"
echo "::group::gcc -v"
gcc -v
echo "::endgroup::"
if: ${{ runner.os == 'Linux' }}
- name: echo macOS build params
run: |
echo "::group::sysctl -n machdep.cpu.brand_string"
sysctl -n machdep.cpu.brand_string
echo "::endgroup::"
echo "::group::sysctl -a | grep machdep.cpu"
sysctl -a | grep machdep.cpu
echo "::endgroup::"
echo "::group::uname -a"
uname -a
echo "::endgroup::"
echo "::group::sw_vers -productVersion"
sw_vers -productVersion
echo "::endgroup::"
echo "::group::system_profiler SPSoftwareDataType"
system_profiler SPSoftwareDataType
echo "::endgroup::"
if: ${{ runner.os == 'macOS' }}
- name: echo Windows build params
run: |
echo ::group::wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status
wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status
echo ::endgroup::
echo ::group::wmic cpu list /format:list
wmic cpu list /format:list
echo ::endgroup::
shell: cmd
if: ${{ runner.os == 'Windows' }}
- name: Work around https://github.com/actions/checkout/issues/766 / https://github.com/ocaml/setup-ocaml/issues/479 / https://github.com/actions/checkout/issues/767 / https://github.com/actions/checkout/issues/760
run: |
%CYGWIN_ROOT%\bin\bash.exe -l -c 'git config --global --add safe.directory "*"'
shell: cmd
if: ${{ runner.os == 'Windows' }}
- name: echo opam build params
run: |
echo ::group::ocamlc -config
opam exec -- ocamlc -config
echo ::endgroup::
echo ::group::opam list
opam list
echo ::endgroup::
- run: opam repo add coq-core-dev https://coq.inria.fr/opam/core-dev
- run: opam repo add coq-released https://coq.inria.fr/opam/released
- run: opam repo add coq-extra-dev https://coq.inria.fr/opam/extra-dev
- run: opam update
- run: opam depext coq.${{ matrix.coq-version }}
- run: opam pin --kind=version add coq ${{ matrix.coq-version }}
- name: echo more build params
run: |
echo ::group::opam list
opam list
echo ::endgroup::
echo ::group::coqc --config
opam exec -- coqc --config
echo ::endgroup::
echo ::group::coqc --version
opam exec -- coqc --version
echo ::endgroup::
echo ::group::echo ~ coqtop
echo "" | opam exec -- coqtop
echo ::endgroup::
- run: opam exec -- opam-depext coq-fiat-crypto
- run: opam install coq-fiat-crypto --with-test ${{ matrix.os.opam-jobs-flag }}
env:
COQEXTRAFLAGS: ${{ matrix.os.coq-extra-flags }}
- name: cat opam logs (Linux, Mac)
run: |
for i in $(find ~/.opam/log/ -type f); do echo "::group::$i"; cat "$i"; echo "::endgroup::"; done
if: ${{ always() && ( runner.os == 'Linux' || runner.os == 'macOS' ) }}
- name: cat opam logs (Windows, native)
run: |
opam exec -- cat ~/.opam/log/*
true
if: ${{ always() && runner.os == 'Windows' }}
- name: cat opam logs (Windows)
run: |
%CYGWIN_ROOT%\bin\bash.exe -l -c 'for i in $(find ~/.opam/log/ -type f); do echo "::group::$i"; cat "$i"; echo "::endgroup::"; done'
shell: cmd
if: ${{ always() && runner.os == 'Windows' }}
- run: opam list
- run: opam exec -- fiat_crypto -h
- run: opam exec -- fiat_crypto word-by-word-montgomery -h
- run: opam exec -- fiat_crypto unsaturated-solinas -h
- run: opam exec -- fiat_crypto saturated-solinas -h
- run: opam exec -- fiat_crypto base-conversion -h