-
Notifications
You must be signed in to change notification settings - Fork 15
122 lines (109 loc) · 4.35 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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