From 7fd51acb5688f5ae544433256ecbb709831a2440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= Date: Wed, 15 Jan 2025 14:19:12 -0800 Subject: [PATCH] test --- .../workflows/build-windows-selfhosted.yml | 72 ++++++++++--------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-windows-selfhosted.yml b/.github/workflows/build-windows-selfhosted.yml index dbb5d858320..d3efda20ad5 100644 --- a/.github/workflows/build-windows-selfhosted.yml +++ b/.github/workflows/build-windows-selfhosted.yml @@ -6,43 +6,49 @@ on: push: jobs: + # We begin from a source package (built in Linux) + build-src: + uses: ./.github/workflows/build-src.yml + build-windows: + 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: - - run: echo "CYGWIN=winsymlinks:nativestrict" >>$GITHUB_ENV - - name: Check out repo - uses: actions/checkout@v4 - - - run: cd $GITHUB_WORKSPACE && ls -lR - shell: C:\cygwin64\bin\bash.exe --login '{0}' - - run: cd $GITHUB_WORKSPACE && ls -l stage0/Makefile - shell: C:\cygwin64\bin\bash.exe --login '{0}' - - run: cd $GITHUB_WORKSPACE && cat stage0/Makefile - shell: C:\cygwin64\bin\bash.exe --login '{0}' - - - 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. - cd $GITHUB_WORKSPACE && 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 && echo "There is a CR at the end of this line" - - - name: Build a package - shell: C:\cygwin64\bin\bash.exe --login '{0}' - run: | - cd $GITHUB_WORKSPACE && eval $(opam env) && export CC=x86_64-w64-mingw32-gcc.exe && make -j$(nproc) package && echo "There is a CR at the end of this line" - - - name: Test the package - shell: C:\cygwin64\bin\bash.exe --login '{0}' - run: | - cd $GITHUB_WORKSPACE && 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 + - uses: actions/download-artifact@v4 + with: + name: package-src + - run: cd $GITHUB_WORKSPACE && tar xzf fstar-src.tar.gz + + - run: cd $GITHUB_WORKSPACE && ls -lR + shell: C:\cygwin64\bin\bash.exe --login '{0}' + - run: cd $GITHUB_WORKSPACE && ls -l stage0/Makefile + shell: C:\cygwin64\bin\bash.exe --login '{0}' + - run: cd $GITHUB_WORKSPACE && cat stage0/Makefile + shell: C:\cygwin64\bin\bash.exe --login '{0}' + + - 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. + cd $GITHUB_WORKSPACE && 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; echo FSTAR_RELEASE=1 >> $GITHUB_ENV; fi && echo "There is a CR at the end of this line" + + - name: Build a package + shell: C:\cygwin64\bin\bash.exe --login '{0}' + run: | + cd $GITHUB_WORKSPACE && cd fstar && eval $(opam env) && export CC=x86_64-w64-mingw32-gcc.exe && make -j$(nproc) package ADMIT=1 && echo "There is a CR at the end of this line" + + # - name: Test the package + # shell: C:\cygwin64\bin\bash.exe --login '{0}' + # run: | + # cd $GITHUB_WORKSPACE && cd fstar && 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/fstar-*.zip + name: package-win