Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build 32 bit versions for Windows #38

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 45 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ jobs:
- os: macos-11
release_package: macos11+_bin_universal
- os: windows-2022
release_package: windows_bin_x86_64
release_package_64: windows_bin_x86_64
release_package_32: windows_bin_x86
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -71,6 +72,10 @@ jobs:
- if: startsWith(matrix.os, 'windows')
name: Configure CMake Windows
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}}

- if: startsWith(matrix.os, 'windows')
name: Configure CMake Windows 32 bit
run: cmake -B ${{github.workspace}}/build32 -A Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}}

- if: startsWith(matrix.os, 'ubuntu')
name: Configure CMake Linux
Expand All @@ -82,15 +87,26 @@ jobs:

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2

- if: startsWith(matrix.os, 'windows')
name: Build Windows 32
run: cmake --build ${{github.workspace}}/build32 --config ${{env.BUILD_TYPE}} --parallel 2

- if: startsWith(matrix.os, 'windows')
name: Package Windows
run: |
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app/
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build32/app/

cp ${{github.workspace}}/build/app/Release/DeltaPatcher.exe ${{github.workspace}}/build/app/
cp ${{github.workspace}}/build32/app/Release/DeltaPatcher.exe ${{github.workspace}}/build32/app/

cd ${{github.workspace}}/build/app/
Compress-Archive -Path DeltaPatcher.exe,CHANGELOG.txt -Destination ${{ matrix.release_package }}.zip
Compress-Archive -Path DeltaPatcher.exe,CHANGELOG.txt -Destination ${{ matrix.release_package_64 }}.zip

cd ${{github.workspace}}/build32/app/
Compress-Archive -Path DeltaPatcher.exe,CHANGELOG.txt -Destination ${{ matrix.release_package_32 }}.zip

- if: startsWith(matrix.os, 'ubuntu')
name: Package Linux
run: |
Expand All @@ -106,23 +122,45 @@ jobs:
cd ${{github.workspace}}/build/app
zip -r ${{ matrix.release_package }}.zip DeltaPatcher.app/ CHANGELOG.txt

- uses: actions/upload-artifact@v3
- if: startsWith(matrix.os, 'windows')
name: Upload artifacts Windows x86_64
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.release_package_64 }}
path: ${{github.workspace}}/build/app/${{ matrix.release_package_64 }}.zip

- if: startsWith(matrix.os, 'windows')
name: Upload artifacts Windows x86
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.release_package_32 }}
path: ${{github.workspace}}/build32/app/${{ matrix.release_package_32 }}.zip

- if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
name: Upload artifacts Linux and MacOS
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.release_package }}
path: ${{github.workspace}}/build/app/${{ matrix.release_package }}.zip

- if: contains(github.ref, 'refs/tags/') && startsWith(matrix.os, 'windows')
name: Define Asset Path Windows
id: asset_path_win
run: |
$ass_path = "${{github.workspace}}/build/app/${{ matrix.release_package }}.zip" -replace '\\','/'
echo "ASSET_PATH=$ass_path" >> $env:GITHUB_OUTPUT
$ass_path_64 = "${{github.workspace}}/build/app/${{ matrix.release_package_64 }}.zip" -replace '\\','/'
echo "ASSET_PATH_64=$ass_path_64" >> $env:GITHUB_OUTPUT
$ass_path_32 = "${{github.workspace}}/build32/app/${{ matrix.release_package_32 }}.zip" -replace '\\','/'
echo "ASSET_PATH_32=$ass_path_32" >> $env:GITHUB_OUTPUT


- if: contains(github.ref, 'refs/tags/') && startsWith(matrix.os, 'windows')
name: Upload Release Assets Windows
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.asset_path_win.outputs.ASSET_PATH }}
files: |
${{ steps.asset_path_win.outputs.ASSET_PATH_64 }}
${{ steps.asset_path_win.outputs.ASSET_PATH_32 }}


- if: contains(github.ref, 'refs/tags/') && !startsWith(matrix.os, 'windows')
name: Upload Release Assets
Expand Down