-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3684 from FStarLang/_guido_windows
Windows build (with self-hosted runner)
- Loading branch information
Showing
11 changed files
with
107 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build F* (Windows, self-hosted) | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# We begin from a source package (built in Linux) | ||
build-src: | ||
uses: ./.github/workflows/build-src.yml | ||
|
||
build: | ||
needs: build-src | ||
runs-on: [self-hosted, Windows, X64, opam-2-3] | ||
# NOTE: no setup, the self-hosted runner already has all that is needed. | ||
# This workflow also has many weird restrictions like | ||
# having to set cygwin bash, cd into $GITHUB_WORKSPACE, and keep | ||
# shell commands to a single line. | ||
steps: | ||
- name: test | ||
shell: C:\cygwin64\bin\bash.exe --login '{0}' | ||
run: echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" | ||
|
||
- name: clean | ||
shell: C:\cygwin64\bin\bash.exe --login '{0}' | ||
run: cd $GITHUB_WORKSPACE/ && rm -rf * && echo "There is a CR at the end of this line" | ||
# ^ clean the workspace | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: package-src | ||
- run: cd $GITHUB_WORKSPACE && tar xzf fstar-src.tar.gz | ||
shell: C:\cygwin64\bin\bash.exe --login '{0}' | ||
|
||
# DO NOT DO THIS. These variables will be lost since bash will | ||
# not look at the environment of the calling cmd shell. | ||
# - name: Prepare environment | ||
# shell: C:\cygwin64\bin\bash.exe --login '{0}' | ||
# run: | | ||
# echo "CC=x86_64-w64-mingw32-gcc.exe" >> $GITHUB_ENV | ||
# echo "FSTAR_DUNE_OPTIONS=-j1" >> $GITHUB_ENV | ||
# echo "DUNE_CONFIG__BACKGROUND_SANDBOXES=disabled" >> $GITHUB_ENV | ||
# ^ Related issues: | ||
# https://github.com/ocaml/dune/issues/2324 | ||
# https://github.com/ocaml/dune/issues/10076 | ||
|
||
- name: Build a package | ||
shell: C:\cygwin64\bin\bash.exe --login '{0}' | ||
run: | | ||
cd $GITHUB_WORKSPACE && cd fstar && eval $(opam env) && make clean && CC=x86_64-w64-mingw32-gcc.exe DUNE_CONFIG__BACKGROUND_SANDBOXES=disabled make -j$(nproc) package V=1 ADMIT=1 && mv fstar.zip fstar-Windows_NT-x86_64.zip && echo "There is a CR at the end of this line" | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: fstar/fstar*.zip | ||
name: package-win | ||
|
||
binary-smoke: | ||
needs: build | ||
# This is a cloud job. | ||
runs-on: windows-latest | ||
steps: | ||
- name: Get package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: package-win | ||
|
||
- run: unzip fstar*.zip | ||
shell: bash | ||
|
||
- name: Smoke test | ||
working-directory: fstar | ||
run: | | ||
./bin/fstar.exe lib/fstar/ulib/Prims.fst -f -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ name: CI | |
|
||
on: | ||
push: | ||
branches-ignore: | ||
- _** | ||
pull_request: | ||
workflow_dispatch: | ||
merge_group: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters