From d5a03452e8eaf8c9a5da4d534e8507138c6a0bc4 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 11 Apr 2020 21:16:32 +1200 Subject: [PATCH] Switch Windows GitHub Actions builds away from self-hosted --- .github/workflows/dump.yml | 2 +- .github/workflows/master_build.yml | 24 ++++++++++++------------ .github/workflows/pr_build.yml | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dump.yml b/.github/workflows/dump.yml index 315385aa7a..dc7dd686d0 100644 --- a/.github/workflows/dump.yml +++ b/.github/workflows/dump.yml @@ -10,7 +10,7 @@ jobs: one: strategy: matrix: - os: [[self-hosted, windows], macOS-latest] + os: [windows-latest, macOS-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 350181a3c8..9ef4728cb0 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -84,9 +84,9 @@ jobs: build: strategy: matrix: - os: [[self-hosted, windows], macOS-latest] + os: [windows-latest, macOS-latest] build_type: [full, client] - #os: [[self-hosted, windows], macOS-latest, ubuntu-latest] + #os: [windows-latest, macOS-latest, ubuntu-latest] # exclude: # - os: ubuntu-latest # build_type: client @@ -122,7 +122,7 @@ jobs: echo "::set-output name=symbols_archive::${{ steps.buildnumber.outputs.build_number }}-${{ matrix.build_type }}-mac-symbols.zip" fi # Windows build variables - if [ "${{ matrix.os[1] }}" = "windows" ]; then + if [ "${{ matrix.os }}" = "windows-latest" ]; then echo ::set-env name=PYTHON_EXEC::python echo ::set-env name=ZIP_COMMAND::7z echo ::set-env name=ZIP_ARGS::a @@ -154,13 +154,13 @@ jobs: echo ::set-env name=CMAKE_EXTRA::"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode" fi # Windows build variables - if [ "${{ matrix.os[1] }}" = "windows" ]; then + if [ "${{ matrix.os }}" = "windows-latest" ]; then echo ::set-env name=CMAKE_EXTRA::"-A x64" echo ::set-env name=HF_PFX_PASSPHRASE::${{secrets.pfx_key}} echo "::set-env name=HF_PFX_FILE::${{runner.workspace}}\build\codesign.pfx" fi - name: Clear Working Directory - if: matrix.os[1] == 'windows' + if: matrix.os == 'windows-latest' shell: bash working-directory: ${{runner.workspace}} run: rm -rf ./* @@ -171,12 +171,12 @@ jobs: - name: Create Build Directory run: cmake -E make_directory ${{runner.workspace}}/build - name: Decrypt Signing Key (Windows) - if: matrix.os[1] == 'windows' + if: matrix.os == 'windows-latest' working-directory: ${{runner.workspace}}/build shell: bash run: gpg --batch --yes -o codesign.pfx --passphrase "${{secrets.gpg_symmetric_key}}" --decrypt $GITHUB_WORKSPACE/tools/ci-scripts/codesign.pfx.gpg - name: Import Signing Key (Windows) - if: matrix.os[1] == 'windows' + if: matrix.os == 'windows-latest' working-directory: ${{runner.workspace}}/build shell: powershell run: | @@ -214,7 +214,7 @@ jobs: shell: bash run: cmake --build . --config $BUILD_TYPE --target package - name: Sign Installer (Windows) - if: matrix.os[1] == 'windows' + if: matrix.os == 'windows-latest' shell: powershell working-directory: C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64 run: .\signtool.exe sign /fd sha256 /f ${{runner.workspace}}\build\codesign.pfx /p ${{secrets.pfx_key}} /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 ${{runner.workspace}}\build\${env:INSTALLER} @@ -227,7 +227,7 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }} run: $PYTHON_EXEC $GITHUB_WORKSPACE/tools/ci-scripts/upload.py - name: Archive Symbols - if: (matrix.os[1] == 'windows') || (matrix.os == 'macOS-latest') + if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') working-directory: ${{runner.workspace}} shell: bash run: | @@ -237,19 +237,19 @@ jobs: cd $SYMBOLS_TEMP $ZIP_COMMAND $ZIP_ARGS ../${{ steps.buildenv1.outputs.symbols_archive }} . - name: Upload Symbols - if: (matrix.os[1] == 'windows') || (matrix.os == 'macOS-latest') + if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') working-directory: ${{runner.workspace}} shell: bash run: | curl --data-binary @${{ steps.buildenv1.outputs.symbols_archive }} "$CMAKE_BACKTRACE_URL/post?format=symbols&token=$CMAKE_BACKTRACE_SYMBOLS_TOKEN&upload_file=${{steps.buildenv1.outputs.symbols_archive}}&tag=$RELEASE_NUMBER" # - name: Debug List Symbols - # if: (matrix.os[1] == 'windows') || (matrix.os == 'macOS-latest') + # if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') # working-directory: ${{runner.workspace}} # shell: bash # run: | # unzip -v "${{runner.workspace}}/${{ steps.buildenv1.outputs.symbols_archive }}" # - name: Debug Upload Symbols Artifact - # if: (matrix.os[1] == 'windows') || (matrix.os == 'macOS-latest') + # if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') # uses: actions/upload-artifact@v1 # with: # name: symbols diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index de97374107..b90062f75b 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -28,7 +28,7 @@ jobs: build: strategy: matrix: - os: [[self-hosted, windows], macOS-latest] + os: [windows-latest, macOS-latest] build_type: [full] fail-fast: false runs-on: ${{matrix.os}} @@ -51,7 +51,7 @@ jobs: echo ::set-env name=CMAKE_EXTRA::"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode" fi # Windows build variables - if [ "${{ matrix.os[1] }}" = "windows" ]; then + if [ "${{ matrix.os }}" = "windows-latest" ]; then echo ::set-env name=PYTHON_EXEC::python echo ::set-env name=INSTALLER_EXT::exe echo ::set-env name=CMAKE_EXTRA::"-A x64" @@ -101,7 +101,7 @@ jobs: shell: bash run: cmake --build . --config $BUILD_TYPE --target package - name: Output Installer Logs - if: failure() && matrix.os[1] == 'windows' + if: failure() && matrix.os == 'windows-latest' shell: bash working-directory: ${{runner.workspace}}/build run: cat ./_CPack_Packages/win64/NSIS/NSISOutput.log