Merge pull request #189 from barak/master #64
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: CD | |
on: | |
push: | |
branches: | |
- cd_* | |
- master | |
- release* | |
env: | |
WX_WIDGETS_VERSION: 3.2.2.1 | |
TARGET_OSX_VERSION: 10.14 | |
jobs: | |
# ############################################################################ | |
# The build_wxwidgets_<platform> jobs handle building and caching wxWidgets. | |
# | |
# This reduces total build time by a measurable amount, as wxWidgets can take | |
# over 30 minutes to build. | |
# ############################################################################ | |
build_wxwidgets_linux: | |
name: Build wxWidgets for Linux | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Cache wxWidgets | |
uses: actions/cache@v4 | |
id: wxwidgets-cache | |
with: | |
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
- name: Update Package Info | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
run: | | |
sudo apt-get update | |
- name: Install Dependencies | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
run: > | |
sudo apt-get install libgtk-3-dev | |
- name: Download wxWidgets | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
working-directory: ${{ runner.temp }} | |
run: | | |
wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 | |
tar -xjf wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 | |
- name: Build wxwidgets | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
run: | | |
mkdir gtk-build | |
cd gtk-build | |
../configure | |
make -j2 | |
build_wxwidgets_osx: | |
name: Build wxWidgets for OSX | |
runs-on: macos-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Cache wxWidgets | |
uses: actions/cache@v4 | |
id: wxwidgets-cache | |
with: | |
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
- name: Download wxWidgets | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
working-directory: ${{ runner.temp }} | |
run: | | |
wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 | |
tar -xjf wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 | |
- name: Build wxwidgets | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
run: | | |
mkdir build-static | |
cd build-static | |
../configure --disable-shared --enable-unicode --with-macosx-version-min=${{ env.TARGET_OSX_VERSION }} --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --without-libtiff | |
make -j2 | |
build_wxwidgets_windows: | |
name: Build wxWidgets for Windows | |
runs-on: windows-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Cache wxWidgets | |
uses: actions/cache@v4 | |
id: wxwidgets-cache | |
with: | |
path: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
- name: Install Dependencies | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW32 | |
install: > | |
git | |
base-devel | |
mingw-w64-i686-toolchain | |
unzip | |
- name: Download wxWidgets | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
working-directory: ${{ runner.temp }} | |
shell: msys2 {0} | |
run: | | |
mkdir wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
cd wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip | |
unzip -q wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip | |
rm wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip | |
- name: Build wxWidgets | |
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' | |
working-directory: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }}\build\msw | |
shell: msys2 {0} | |
# NOTE: prebuilding setup.h using the setup_h tag allows the main build to use multiple cores | |
run: | | |
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release clean | |
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release setup_h | |
mingw32-make -j2 -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release | |
# ############################################################################ | |
# The build_<platform> jobs handle building Logo for each platform. | |
# | |
# Linux is run first as it produces the PDF for the other platform builds | |
# to use. | |
# ############################################################################ | |
build_linux: | |
name: Build Logo for Linux | |
needs: [ build_wxwidgets_linux ] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Update Package Info | |
run: | | |
sudo apt-get update | |
- name: Install Dependencies | |
run: > | |
sudo apt-get install | |
autoconf-archive | |
libgtk-3-dev | |
texlive | |
zip | |
- name: wxWidgets Cache | |
uses: actions/cache@v4 | |
id: wxwidgets-cache | |
with: | |
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
- name: Install wxwidgets | |
# Install wxwidgets from cache on build machine so autoconf has WX_CONFIG_CHECK | |
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
run: | | |
cd gtk-build | |
sudo make install | |
sudo cp ../wxwin.m4 /usr/share/aclocal/ | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build Logo | |
run: | | |
autoreconf --install | |
./configure --enable-gitid | |
make -j2 dist | |
make -j2 dist-zip | |
- name: Archive ucblogo.tar.gz | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ucblogo.tar.gz | |
path: > | |
*.tar.gz | |
- name: Archive ucblogo.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ucblogo.zip | |
path: > | |
*.zip | |
- name: Archive ucblogo.pdf | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ucblogo.pdf | |
path: docs/ucblogo.pdf | |
build_osx: | |
name: Build Logo for OSX | |
needs: [ build_wxwidgets_osx, build_linux ] | |
runs-on: macos-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Install Dependencies | |
run: > | |
brew install | |
autoconf-archive | |
automake | |
- name: wxWidgets Cache | |
uses: actions/cache@v4 | |
id: wxwidgets-cache | |
with: | |
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
- name: Install wxwidgets | |
# Install wxwidgets from cache on build machine so autoconf has WX_CONFIG_CHECK | |
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
run: | | |
cd build-static | |
sudo make install | |
sudo cp ../wxwin.m4 /opt/homebrew/share/aclocal/ | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download PDF manual | |
uses: actions/[email protected] | |
with: | |
name: ucblogo.pdf | |
path: docs | |
- name: Build Logo | |
env: | |
WX_CONFIG_PATH: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}/build-static/wx-config | |
CFLAGS: -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }} | |
CPPFLAGS: -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }} | |
CXXFLAGS: -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }} | |
LDFLAGS: -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }} | |
run: | | |
autoreconf --install | |
./configure --enable-gitid --with-wx-config=$WX_CONFIG_PATH | |
make -j2 ucblogo.dmg | |
- name: Archive ucblogo.dmg | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ucblogo.dmg | |
path: ucblogo.dmg | |
build_windows: | |
name: Build Logo for Windows | |
needs: [ build_wxwidgets_windows, build_linux ] | |
runs-on: windows-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Install Dependencies | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW32 | |
install: > | |
git | |
base-devel | |
mingw-w64-i686-toolchain | |
unzip | |
- name: wxWidgets Cache | |
uses: actions/cache@v4 | |
id: wxwidgets-cache | |
with: | |
path: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Prepare Repository | |
shell: msys2 {0} | |
run: | | |
git clean -x -d -f . | |
mingw32-make -f makefile.msys git.c | |
rm libloc.c | |
- name: Download PDF manual | |
uses: actions/[email protected] | |
with: | |
name: ucblogo.pdf | |
path: docs | |
- name: Find MinGW bin directory | |
shell: msys2 {0} | |
run: | | |
echo "MINGW_BIN_DIR=`dirname $(command -v gcc)`" >> $GITHUB_ENV | |
- name: Build Logo | |
shell: msys2 {0} | |
env: | |
WX_DIR: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }} | |
run: | | |
mingw32-make -f makefile.msys MINGW_BIN_DIR=$MINGW_BIN_DIR WX_DIR=$WX_DIR install_win | |
- name: Run Inno | |
working-directory: ${{ github.workspace }}\inno | |
shell: pwsh | |
run: | | |
iscc ucblogo.iss | |
- name: Archive installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ucblogosetup.exe | |
path: inno/ucblogo*setup.exe |