-
Notifications
You must be signed in to change notification settings - Fork 9
197 lines (176 loc) · 6.71 KB
/
linux.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: "Linux builds"
on: [push]
#https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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,
# toollabel: vs170,
# package: win32-vs22
# }
# - {
# name: "Windows Latest MinGW",
# os: windows-latest,
# toolchain: mingw64,
# toollabel: mingw64,
# package: win32-w64
# }
# - {
# name: "Windows Latest OWC",
# os: windows-latest,
# toolchain: owc20,
# toollabel: owc20,
# package: win32-owc
# }
- {
name: "Ubuntu Latest GCC",
os: ubuntu-latest,
toolchain: gcc,
toollabel: gcc,
package: ubuntu-gcc
}
# - {
# name: "MacOS Latest GCC",
# os: macos-latest,
# toolchain: gcc,
# toollabel: gcc,
# package: macos-gcc
# }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Snapshot Source
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
mkdir .snapshot
tar --exclude-vcs --exclude='./.snapshot' --exclude='./win32' --exclude='./contrib' --exclude='./support/*.bat' --exclude='./defunct' -cf .snapshot/source-snapshot.tar .
tar --exclude-vcs -cf .snapshot/contrib-snapshot.tar ./contrib
- name: Source Snapshot Publish
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: actions/upload-artifact@v4
with:
name: source-snapshot
path: .snapshot/source-snapshot.tar
compression-level: 9
- name: Contrib Snapshot Publish
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: actions/upload-artifact@v4
with:
name: contrib-snapshot
path: .snapshot/contrib-snapshot.tar
compression-level: 9
- 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 add-apt-repository universe
sudo apt-get install -y libncurses-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 libexplain-dev
sudo apt-get install -y libarchive-dev
## 24/10: removed
## legacy: sudo apt-get install -y libncursesw5-dev
## missing: sudo apt-get install -y libguess-dev
- name: MacOS, setup
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
brew install pkg-config
brew install ncurses
brew link ncurses
brew install enchant
brew install libspelling
brew install hunspell
brew install libarchive
brew install wget
- 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.toollabel }}/release/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: |
chmod +x configure
./support/config_withncursesw
- 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
chmod +x configure
./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@v4
with:
name: package-${{ matrix.config.package }}
path: ./bin.${{ matrix.config.toollabel }}/release/*