-
Notifications
You must be signed in to change notification settings - Fork 236
60 lines (51 loc) · 1.75 KB
/
build-windows.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
name: Build F* (Windows)
# Build F* on Windows
on:
workflow_call:
workflow_dispatch:
push:
defaults:
run:
shell:
bash
# ^ avoid powershell!
jobs:
build-windows:
# NOTE! Unlike our other builds, this requires a self-hosted
# runner (for now?)
runs-on: [self-hosted, Windows, X64, opam-2-3]
steps:
- uses: actions/checkout@master
with:
path: FStar
# self-hosted runner already set up
# - uses: ocaml/setup-ocaml@v3
# with:
# ocaml-compiler: 4.14.2
# - name: Prepare
# shell: powershell # somehow in bash we fail to build ocamlfind?
# run: |
# ./FStar/.scripts/get_fstar_z3.sh $HOME/bin
# echo "PATH=$HOME/bin:$PATH" >> $GITHUB_ENV
# opam install --deps-only FStar\fstar.opam
- name: Set version
#shell: C:\cygwin64\bin\bash.exe --login '{0}'
run: |
# Setting FSTAR_VERSION for nightly and release builds. If unset,
# we use $(version.txt)~dev. Setting it avoids the ~dev.
if [[ "${{github.workflow_ref}}" =~ "nightly.yml" ]]; then
echo FSTAR_VERSION="nightly-$(date -I)" >> $GITHUB_ENV
elif [[ "${{github.workflow_ref}}" =~ "release.yml" ]]; then
echo FSTAR_VERSION="$(cat FStar/version.txt)" >> $GITHUB_ENV
fi
- name: Build package
shell: C:\cygwin64\bin\bash.exe --login '{0}'
working-directory: FStar
run: |
eval $(opam env)
export CC=x86_64-w64-mingw32-gcc.exe
make -skj$(nproc) package FSTAR_TAG=-Windows_NT-x86_64 V=1
- uses: actions/upload-artifact@v4
with:
path: FStar\fstar-Windows_NT-x86_64.tar.gz
name: fstar-Windows_NT-x86_64.tar.gz