Restored custom wx crossbuild and switched to latest version for wind… #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: write | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get dependencies | |
run: sudo apt-get install -y build-essential cmake libwxgtk3.0-gtk3-dev imagemagick | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Package | |
working-directory: ${{github.workspace}}/build | |
run: cpack | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: GoOdf-${{github.ref_name}}-linux | |
path: ${{github.workspace}}/build/GoOdf*.tar.gz | |
build-cross-windows: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache wxCrossbuild | |
id: cache-wxcross | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/wxCross | |
key: wxCrossbuild | |
- name: Get dependencies | |
run: sudo apt-get install -y wget build-essential cmake pkg-config g++-mingw-w64-x86-64 imagemagick | |
- name: Cross compile wxWidgets | |
if: steps.cache-wxcross.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxWidgets-3.2.4.tar.bz2 | |
tar -xf wxWidgets-3.2.4.tar.bz2 | |
mkdir wxCross | |
cd wxWidgets-3.2.4 | |
mkdir win-ur-static | |
cd win-ur-static | |
../configure --host=x86_64-w64-mingw32 --prefix=${{github.workspace}}/wxCross --enable-unicode --disable-shared | |
make | |
make install | |
cd .. | |
cd .. | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/crossbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=toolchain.def | |
- name: Build | |
run: cmake --build ${{github.workspace}}/crossbuild --config ${{env.BUILD_TYPE}} | |
- name: Package | |
working-directory: ${{github.workspace}}/crossbuild | |
run: cpack | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: GoOdf-${{github.ref_name}}-windows | |
path: ${{github.workspace}}/crossbuild/GoOdf*.zip | |
release: | |
needs: [ build-linux, build-cross-windows ] | |
name: Create GitHub Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: GoOdf-${{github.ref_name}}-linux | |
- uses: actions/download-artifact@v4 | |
with: | |
name: GoOdf-${{github.ref_name}}-windows | |
- name: Remove Starting v From Tag | |
id: remove_v | |
run: | | |
TAG=${{github.ref_name}} | |
echo "release_version=${TAG#v}" >> $GITHUB_ENV | |
- name: Populate Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: false | |
prerelease: false | |
body: Release files created from GitHub action runners. | |
files: | | |
GoOdf-${{env.release_version}}-linux.x86_64.tar.gz | |
GoOdf-${{env.release_version}}-windows.x86_64.zip |