build #43
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: 'build' | |
on: | |
push: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
msys2: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 2 | |
matrix: | |
target: [ | |
{ msys2: MINGW32, arch: i686 }, | |
{ msys2: MINGW64, arch: x86_64} | |
] | |
gtk: [ 2, 3 ] | |
continue-on-error: true | |
defaults: | |
run: | |
shell: msys2 {0} | |
env: | |
MINGW_INSTALLS: ${{ matrix.target.msys2 }} | |
steps: | |
- run: git config --global core.autocrlf input | |
shell: bash | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: > | |
base-devel | |
git | |
mingw-w64-${{ matrix.target.arch }}-toolchain | |
mingw-w64-${{ matrix.target.arch }}-autotools | |
mingw-w64-${{ matrix.target.arch }}-gperf | |
msystem: ${{ matrix.target.msys2 }} | |
- name: Build package | |
working-directory: MSYS2/gtk${{ matrix.gtk }} | |
run: | | |
tries=0 | |
# Try building three times due to the arbitrary 'Bad address' error | |
while [ $tries -lt 3 ]; do | |
makepkg-mingw --noconfirm --noprogressbar -sCLfc && exit 0 | |
tries=$((tries+1)) | |
done | |
exit 1 | |
- name: Install and create standalone package | |
working-directory: ./MSYS2/gtk${{ matrix.gtk }} | |
run: | | |
pacman -U --noconfirm mingw-*gtkwave*.pkg.tar.zst | |
mv mingw-*gtkwave*.pkg.tar.zst ../../ | |
../standalone_pkg.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: | | |
mingw-*gtkwave*.pkg.tar.zst | |
gtkwave_*_standalone.tgz | |
nightly: | |
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | |
needs: [ msys2 ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v2 | |
- uses: pyTooling/Actions/releaser@r0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: 'nightly' | |
rm: true | |
files: artifact/* |