From 24b10635a3c83b0a6be90de98dd98b7d0baa2256 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 14 Jul 2021 13:39:50 +0200 Subject: [PATCH 1/3] Add a CI build definition It is always good to have some automation to verify that things build. --- .github/workflows/msbuild.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/msbuild.yml diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml new file mode 100644 index 00000000..b9f574f6 --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,24 @@ +name: Build SFX bundle + +on: [push, pull_request] + +env: + # Path to the solution file relative to the root of the project. + SOLUTION_FILE_PATH: CPP/7zip/Bundles/SFXSetup/SFXSetup.sln + + # Configuration type to build. + BUILD_CONFIGURATION: Release + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.1.3 + + - name: Build + working-directory: ${{env.GITHUB_WORKSPACE}} + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} From 8c14e10cc9c2abafb21ade06ec3ad339ac1391c6 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 14 Jul 2021 11:47:20 +0000 Subject: [PATCH 2/3] ci: upload built artifact Signed-off-by: Johannes Schindelin --- .github/workflows/msbuild.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index b9f574f6..a08c6afc 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -8,6 +8,7 @@ env: # Configuration type to build. BUILD_CONFIGURATION: Release + SFX_ARTIFACT: 7zS.sfx jobs: build: @@ -22,3 +23,9 @@ jobs: - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} + + - name: Upload SFX bundle + uses: actions/upload-artifact@v3 + with: + name: sfx-bundle + path: CPP/7zip/Bundles/SFXSetup/${{env.BUILD_CONFIGURATION}}/${{env.SFX_ARTIFACT}} From 4c6468713f3186125ea91a1d21957b3f2d6a85b5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 3 Nov 2022 10:15:28 +0100 Subject: [PATCH 3/3] ci: build the artifact that links to MSVCRT.dll It is no longer clear from the documentation at https://sevenzip.osdn.jp/chm/cmdline/switches/sfx.htm that the `7zSD.sfx` links to MSVCRT.dll (as opposed to `7zS.sfx`, which apparently does not). StackOverflow to the rescue: https://stackoverflow.com/a/15770961/1860823 Since Git for Windows wants to use the minimum amount of dependencies in the self-extracting installers (such as the Portable Git), it needs to use the `7zSD.sfx` artifact. Let's build that artifact by default. Signed-off-by: Johannes Schindelin --- .github/workflows/msbuild.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index a08c6afc..f4f908c6 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -7,8 +7,9 @@ env: SOLUTION_FILE_PATH: CPP/7zip/Bundles/SFXSetup/SFXSetup.sln # Configuration type to build. - BUILD_CONFIGURATION: Release - SFX_ARTIFACT: 7zS.sfx + # Note: `ReleaseD` builds 7zSD.sfx (which links to MSVCRT.dll, as opposed to 7zS.sfx, which does not) + BUILD_CONFIGURATION: ReleaseD + SFX_ARTIFACT: 7zSD.sfx jobs: build: