Skip to content

Merge branch 'master' of https://github.com/adamyg/mcwin32 #221

Merge branch 'master' of https://github.com/adamyg/mcwin32

Merge branch 'master' of https://github.com/adamyg/mcwin32 #221

Workflow file for this run

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
}
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: Windows extra
if: startsWith(matrix.config.name, 'Windows Latest MSVC') || startsWith(matrix.config.name, 'Windows Latest OWC')
run: |
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gettext-tools
- name: Generate
if: startsWith(matrix.config.name, 'Windows Latest')
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
@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% --verbose "${{ matrix.config.toolchain }}"
- name: Compile
if: startsWith(matrix.config.name, 'Windows Latest')
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 }}"=="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 Latest MSVC') || startsWith(matrix.config.name, 'Windows Latest OWC')
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 Latest MSVC') || startsWith(matrix.config.name, 'Windows Latest OWC')
uses: softprops/action-gh-release@v1
with:
files: ./mcwin32/releases/mcwin32-build*-setup.exe
draft: true