From 5bb03c4cb4102551e99e8a4ec720e89d0a0fc609 Mon Sep 17 00:00:00 2001 From: karenc-bq Date: Wed, 19 Jun 2024 11:56:41 -0700 Subject: [PATCH 1/4] chore: build installer on visual studio 2022 --- .github/workflows/build-installer.yml | 76 +++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/build-installer.yml diff --git a/.github/workflows/build-installer.yml b/.github/workflows/build-installer.yml new file mode 100644 index 000000000..20e50f490 --- /dev/null +++ b/.github/workflows/build-installer.yml @@ -0,0 +1,76 @@ +name: Release Draft +# This workflow is triggered on creating tags +on: + workflow_dispatch: + pull_request: + branches: + - 'installer' + paths-ignore: + - '**/*.md' + - '**/*.jpg' + - '**/README.txt' + - '**/LICENSE.txt' + - 'docs/**' + - 'ISSUE_TEMPLATE/**' + - '**/remove-old-artifacts.yml' + +env: + BUILD_TYPE: Release + +jobs: + build-windows: + name: Windows + runs-on: windows-latest + env: + CMAKE_GENERATOR: Visual Studio 17 2022 + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + # Configure build environment/dependencies + - name: Install MySQL client libs + run: | + curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-winx64.zip -o mysql.zip + unzip -d C:/ mysql.zip + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Build and install AWS SDK C++ + working-directory: ./scripts + run: | + .\build_aws_sdk_win.ps1 x64 ${{ env.BUILD_TYPE}} ON "${{env.CMAKE_GENERATOR}}" + + - name: Setup nmake + uses: ilammy/msvc-dev-cmd@v1 + + - name: Run build installer script + run: | + .\build_installer.ps1 x64 ${{ env.BUILD_TYPE}} "${{env.CMAKE_GENERATOR}}" C:/mysql-${{ vars.MYSQL_VERSION }}-winx64 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4.0.2 + with: + role-skip-session-tagging: true + aws-access-key-id: ${{ secrets.AWS_BUILD_KEY }} + aws-secret-access-key: ${{ secrets.AWS_BUILD_SECRET_KEY }} + aws-region: us-west-2 + role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} + role-external-id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }} + role-duration-seconds: 3600 + + - name: Run signer script + shell: pwsh + working-directory: ./scripts + run: | + choco upgrade jq -y + . ".\sign_installer.ps1" + Invoke-SignInstaller ${{ github.workspace }}\wix winx64a ${{github.ref_name}} ${{ secrets.AWS_UNSIGNED_BUCKET }} ${{ secrets.AWS_SIGNED_BUCKET }} ${{ secrets.AWS_S3_KEY }}aws-mysql-odbc-${{github.ref_name}}-winx64a.msi + + - name: Upload Windows installer as artifact + if: success() + uses: actions/upload-artifact@v3 + with: + name: installers + path: ${{ github.workspace }}/wix/*.msi + if-no-files-found: error From e953a1faedfb28e70eda0fd98b1cf316f8e7b495 Mon Sep 17 00:00:00 2001 From: karenc-bq Date: Wed, 19 Jun 2024 11:57:52 -0700 Subject: [PATCH 2/4] chore: build installer --- .github/workflows/build-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-installer.yml b/.github/workflows/build-installer.yml index 20e50f490..4cf5b929e 100644 --- a/.github/workflows/build-installer.yml +++ b/.github/workflows/build-installer.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: pull_request: branches: - - 'installer' + - 'windows-installer' paths-ignore: - '**/*.md' - '**/*.jpg' From c4967dfc27c154416620eec3911fb576b0231e1f Mon Sep 17 00:00:00 2001 From: karenc-bq Date: Wed, 19 Jun 2024 11:59:24 -0700 Subject: [PATCH 3/4] chore: build installer --- .github/workflows/build-installer.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-installer.yml b/.github/workflows/build-installer.yml index 4cf5b929e..c14d4c2ee 100644 --- a/.github/workflows/build-installer.yml +++ b/.github/workflows/build-installer.yml @@ -1,7 +1,6 @@ -name: Release Draft +name: Build installer # This workflow is triggered on creating tags on: - workflow_dispatch: pull_request: branches: - 'windows-installer' From 52ce962efb75899ff3d000001ec3d504e8296f4e Mon Sep 17 00:00:00 2001 From: karenc-bq Date: Wed, 19 Jun 2024 12:45:22 -0700 Subject: [PATCH 4/4] chore: remove cmake upgrade --- .github/workflows/main.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02f96bc1d..b04c8544c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,11 +40,6 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 - - name: Update CMAKE Version - shell: pwsh - run: | - choco upgrade cmake --pre - - name: Cache AWS SDK libraries id: cache-dynamic-aws-sdk uses: actions/cache@v4