From 5581007bab8cc6f58d36b32758af12f6e1ddf90b Mon Sep 17 00:00:00 2001 From: Supakorn 'Jamie' Rassameemasmuang Date: Sun, 25 Aug 2024 02:05:16 -0600 Subject: [PATCH] CI: Add packaging step for asy. --- .../workflows/package-asy-installer-win.yml | 46 +++++++++++++++++++ .github/workflows/pull-req-precheck.yml | 14 ++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/package-asy-installer-win.yml diff --git a/.github/workflows/package-asy-installer-win.yml b/.github/workflows/package-asy-installer-win.yml new file mode 100644 index 000000000..c27b9d86d --- /dev/null +++ b/.github/workflows/package-asy-installer-win.yml @@ -0,0 +1,46 @@ +name: package-asy-installer-win +on: + workflow_call: + +jobs: + package-asy-installer: + runs-on: "windows-2022" + steps: + - name: Install prequisites + run: choco install nsis -y + - name: Test nsis version + run: makensis /version + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: asy-win-x64-buildfiles + path: cmake-build-msvc/release/ + - name: Download asymptote misc docs + uses: actions/download-artifact@v4 + with: + name: asy-win-x64-misc-docs + path: cmake-build-msvc/release/docbuild + - name: Download GUI files + uses: actions/download-artifact@v4 + with: + name: cmake-windows-gui-files + path: GUI/ + - name: Download asymptote.pdf + uses: actions/download-artifact@v4 + with: + name: asy-pdf-file + path: extfiles + - name: do cmake install + run: cmake --install cmake-build-msvc/release --component asy-pre-nsis + - name: Build installer file + run: | + $makensisexc=(Get-Command makensis).Path + & ./cmake-install-w32-nsis-release/build-asy-installer.ps1 -makensis-exec=$makensisexc + - name: Upload generated installer + uses: actions/download-artifact@v4 + with: + name: cmake-windows-gui-files + path: cmake-install-w32-nsis-release/asymptote-*-setup.exe diff --git a/.github/workflows/pull-req-precheck.yml b/.github/workflows/pull-req-precheck.yml index c2cf096b1..4adf9072e 100644 --- a/.github/workflows/pull-req-precheck.yml +++ b/.github/workflows/pull-req-precheck.yml @@ -20,3 +20,17 @@ jobs: uses: ./.github/workflows/test-asy-windows.yml build-gui: uses: ./.github/workflows/build-gui.yml + package-asy-install-file: + needs: + - build-asy-windows + - build-gui + - build-asy-linux + uses: ./.github/workflows/package-asy-installer-win.yml + precheck-pass: # this is a dummy step with the sole purpose of making the PR need only this job to pass + needs: + - test-asy-linux + - test-asy-linux + - package-asy-install-file + runs-on: "ubuntu-22.04" + steps: + - run: echo All prechecks pass!