Skip to content

Commit

Permalink
Restoring self-hosted windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
mtzguido committed Jan 15, 2025
1 parent 3302da8 commit b09d22e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-windows-selfhosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build F* (Windows, self-hosted)

on:
workflow_call:
workflow_dispatch:
push:

jobs:
build-windows:
runs-on: [self-hosted, Windows, X64, opam-2-3]
# NOTE: no setup, the self-hosted runner already has all that is needed.
steps:
- name: Check out repo
uses: actions/checkout@v4

- 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 version.txt)" >> $GITHUB_ENV; echo FSTAR_RELEASE=1 >> $GITHUB_ENV; fi
- name: Build a package
shell: C:\cygwin64\bin\bash.exe --login '{0}'
run: |
eval $(opam env)
export CC=x86_64-w64-mingw32-gcc.exe
make -j$(nproc) package
- name: Test the package
shell: C:\cygwin64\bin\bash.exe --login '{0}'
run: |
eval $(opam env)
export CC=x86_64-w64-mingw32-gcc.exe
export CI_THREADS=$(nproc)
.scripts/test_package.sh
echo "There is a CR at the end of this line"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: fstar-*.zip
name: package-win
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI

on:
push:
branches-ignore:
- _**
pull_request:
workflow_dispatch:
merge_group:
Expand Down

0 comments on commit b09d22e

Please sign in to comment.