-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (145 loc) · 4.81 KB
/
makefile.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
name: Makefile CI
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
ow:
- ver: '1.9'
id: '19'
makefile: 'ow19.mak'
- ver: '2.0'
id: '20'
makefile: 'ow20.mak'
host:
- image: 'ubuntu-latest'
title: 'Linux'
dirsep: ':'
- image: 'windows-latest'
title: 'Windows'
dirsep: ';'
- image: 'macos-13'
title: 'OSX (Intel)'
dirsep: ':'
suf: '-64'
- image: 'macos-14'
title: 'OSX (ARM)'
dirsep: ':'
suf: '-64'
exclude:
- { ow: { ver: '1.9' }, host: { suf: '-64' } }
name: ${{ matrix.host.title }} build host (${{ matrix.ow.ver }})
runs-on: ${{ matrix.host.image }}
steps:
- uses: actions/checkout@v4
- name: Open Watcom setup
uses: open-watcom/setup-watcom@v0
with:
version: ${{ matrix.ow.ver }}${{ matrix.host.suf }}
- name: Create build directories
run: |
mkdir bin
mkdir lib
mkdir include
shell: bash
- name: Build Open Zinc library
run: |
wmake -f ${{ matrix.ow.makefile }} -h dos32
wmake -f ${{ matrix.ow.makefile }} -h windows
wmake -f ${{ matrix.ow.makefile }} -h winnt
wmake -f ${{ matrix.ow.makefile }} -h win32
wmake -f ${{ matrix.ow.makefile }} -h os2
shell: bash
working-directory: source
env:
DOS_INCLUDE: ${{ env.WATCOM }}/h
WINDOWS_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/win
NT_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/nt
OS2_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/os2
- name: Build Open Zinc Designer Libraries
run: |
wmake -f ${{ matrix.ow.makefile }} -h make_dos32_modules
wmake -f ${{ matrix.ow.makefile }} -h make_windows_modules
wmake -f ${{ matrix.ow.makefile }} -h make_winnt_modules
wmake -f ${{ matrix.ow.makefile }} -h make_win32_modules
wmake -f ${{ matrix.ow.makefile }} -h make_os2_modules
shell: bash
working-directory: design
env:
DOS_INCLUDE: ${{ env.WATCOM }}/h
WINDOWS_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/win
NT_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/nt
OS2_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/os2
- name: Build Open Zinc Designer Executables
run: |
wmake -f ${{ matrix.ow.makefile }} -h dos32
wmake -f ${{ matrix.ow.makefile }} -h windows
wmake -f ${{ matrix.ow.makefile }} -h winnt
wmake -f ${{ matrix.ow.makefile }} -h win32
wmake -f ${{ matrix.ow.makefile }} -h os2
shell: bash
working-directory: design
env:
DOS_INCLUDE: ${{ env.WATCOM }}/h
WINDOWS_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/win
NT_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/nt
OS2_INCLUDE: ${{ env.WATCOM }}/h${{ matrix.host.dirsep }}${{ env.WATCOM }}/h/os2
- name: Zip files
run: |
if ($env:RUNNER_OS -eq "Windows") {
7z a openzinc.zip bin lib include
} else {
zip -r openzinc.zip bin lib include
}
shell: pwsh
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: 'ow${{ matrix.ow.ver }}-${{ matrix.host.image }}-snapshot'
path: openzinc.zip
overwrite: true
release:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: 'ubuntu-latest'
steps:
- run: mkdir -p release
shell: bash
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: 'ow1.9-ubuntu-latest-snapshot'
- run: |
7z x openzinc.zip -y -orelease
rm -f openzinc.zip
shell: bash
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: 'ow2.0-ubuntu-latest-snapshot'
- run: |
7z x openzinc.zip -y -orelease
rm -f openzinc.zip
shell: bash
- run: |
cd release
7z a openzinc.zip bin lib include
mv openzinc.zip ..
cd ..
shell: bash
- name: Create release
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${tag#v}" \
--generate-notes \
openzinc.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}