build-234 (#132) #329
Workflow file for this run
This file contains hidden or 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] | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Windows Latest MSVC", | |
os: windows-latest, | |
toolchain: vc2022, | |
toolversion: vs170 | |
} | |
- { | |
name: "Windows Latest MinGW32", | |
os: windows-latest, | |
toolchain: mingw32, | |
toolversion: mingw32 | |
} | |
- { | |
name: "Windows Latest MinGW64", | |
os: windows-latest, | |
toolchain: mingw64, | |
toolversion: mingw64 | |
} | |
- { | |
name: "Windows Latest OWC", | |
os: windows-latest, | |
toolchain: owc20, | |
toolversion: owc20 | |
} | |
- { | |
name: "Windows Legacy OWC", | |
os: windows-latest, | |
toolchain: owc19, | |
toolversion: owc19 | |
} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout submodules | |
run: | | |
git submodule update --init --recursive | |
- name: MSVC setup | |
uses: ilammy/msvc-dev-cmd@v1 | |
if: startsWith(matrix.config.name, 'Windows Latest MSVC') | |
with: | |
arch: x86 | |
- name: MinGW64 setup | |
if: startsWith(matrix.config.name, 'Windows Latest MinGW') | |
shell: cmd | |
run: | | |
c:\msys64\usr\bin\pacman --noconfirm -S base-devel | |
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gcc | |
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gettext-tools | |
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-i686-gcc | |
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-i686-gettext-tools | |
dir c:\msys64\usr\bin | |
- name: OpenWatcom setup | |
uses: open-watcom/setup-watcom@v0 | |
if: startsWith(matrix.config.name, 'Windows Latest OWC') | |
with: | |
version: "2.0" | |
location: "C:\\Watcom" | |
- name: OpenWatcom legacy setup | |
uses: open-watcom/setup-watcom@v0 | |
if: startsWith(matrix.config.name, 'Windows Legacy OWC') | |
with: | |
version: "1.9" | |
location: "C:\\Watcom" | |
- name: Windows extra | |
if: contains(matrix.config.name, 'MSVC') || contains(matrix.config.name, 'OWC') | |
run: | | |
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gettext-tools | |
- name: Generate | |
if: startsWith(matrix.config.name, 'Windows') | |
shell: cmd | |
run: | | |
@if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH% | |
@if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH% | |
@if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom | |
@if "${{ matrix.config.toolchain }}"=="owc19" call .\mcwin32\support\owc19setenv.bat C:\Watcom | |
@set BUSYBOX=./support/busybox | |
@if "${{ matrix.config.toolchain }}"=="mingw64" set BUSYBOX=./support/busybox64 | |
@set PERL=c:/Strawberry/perl/bin/perl | |
cd mcwin32 | |
c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=%BUSYBOX% "${{ matrix.config.toolchain }}" | |
- name: Compile | |
if: startsWith(matrix.config.name, 'Windows') | |
shell: cmd | |
run: | | |
@if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH% | |
@if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH% | |
@if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom | |
@if "${{ matrix.config.toolchain }}"=="owc20" set PATH=%PATH%;c:\msys64\mingw64\bin | |
@if "${{ matrix.config.toolchain }}"=="owc19" call .\mcwin32\support\owc19setenv.bat C:\Watcom | |
@if "${{ matrix.config.toolchain }}"=="owc19" set PATH=%PATH%;c:\msys64\mingw64\bin | |
@if "${{ matrix.config.toolchain }}"=="vc2022" set PATH=%PATH%;c:\msys64\mingw64\bin | |
@set PERL=c:/Strawberry/perl/bin/perl | |
cd mcwin32 | |
.\support\gmake-42 release build | |
- name: Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: package-${{ matrix.config.toolchain }} | |
path: mcwin32/bin.${{ matrix.config.toolversion }}/release/* | |
- name: Installer | |
if: startsWith(matrix.config.name, 'Windows') | |
shell: cmd | |
run: | | |
@set PERL=c:/Strawberry/perl/bin/perl | |
choco install innosetup --version=5.6.1 --force | |
cd mcwin32 | |
@rem .\support\gmake-42 release package | |
"%programfiles(x86)%\Inno Setup 5\ISCC" -DBUILD_INFO=1 -DBUILD_TYPE=release ".\releases\mc-inno-setup.iss" | |
- name: Release artifacts | |
if: startsWith(matrix.config.name, 'Windows') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./mcwin32/releases/mcwin32-build*-setup.exe | |
draft: true | |