-
Notifications
You must be signed in to change notification settings - Fork 9
151 lines (136 loc) · 5.17 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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 MinGW",
os: windows-latest,
toolchain: mingw64,
toolversion: mingw64
}
- {
name: "Windows Latest OWC",
os: windows-latest,
toolchain: owc20,
toolversion: owc20
}
- {
name: "Ubuntu Latest GCC",
os: ubuntu-latest,
toolchain: gcc,
toolversion: gcc
}
- {
name: "MacOS Latest GCC",
os: macos-latest,
toolchain: gcc,
toolversion: gcc
}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- 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-i686-gcc
- 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: Ubuntu, setup
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
sudo apt-get install -y libncurses-dev
sudo apt-get install -y libncursesw5-dev
sudo apt-get install -y libenchant-2-dev
sudo apt-get install -y libaspell-dev
sudo apt-get install -y libhunspell-dev
sudo apt-get install -y libenca-dev
sudo apt-get install -y libguess-dev
sudo apt-get install -y libexplain-dev
sudo apt-get install -y libarchive-dev
- name: MacOS, setup
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
brew install wget
brew install libarchive
- name: Windows, 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 .\support\owc20setenv.bat C:\Watcom
@if NOT "${{ matrix.config.toolchain }}"=="mingw64" c:\msys64\usr\bin\pacman --noconfirm -S bison
@set PERL=c:/Strawberry/perl/bin/perl
c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=./win32/busybox --wget=./win32/wget --bison=c:/msys64/usr/bin/bison --flex=./bin.${{ matrix.config.toolchain }}/flex "${{ matrix.config.toolchain }}"
- name: Windows, 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 .\support\owc20setenv.bat C:\Watcom
@set PERL=c:/Strawberry/perl/bin/perl
.\win32\gmake-42 release contrib
.\win32\gmake-42 release
- name: Ubuntu, generate
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
./support/config_withncurses
- name: Ubuntu, compile
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
make release
- name: MacOS, generate
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
export CPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export CPPPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LD_LIBRARY_PATH
./support/config_withncurses
- name: MacOS, compile
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
export CPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export CPPPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LD_LIBRARY_PATH
make release
- name: Package
uses: actions/upload-artifact@v2
with:
name: package-${{ matrix.config.toolchain }}
path: ./bin.${{ matrix.config.toolversion }}/release/*