-
Notifications
You must be signed in to change notification settings - Fork 11
136 lines (119 loc) · 3.63 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
name: Recompile ido and publish releases
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os.runner }}
strategy:
fail-fast: false
matrix:
os: [
{
name: linux,
runner: ubuntu-20.04
},
{
name: macos,
runner: macos-latest
},
{
name: windows,
runner: windows-latest
},
{
name: linux-arm,
runner: ubuntu-20.04
}
]
ido: [5.3, 7.1]
name: Recompiling ido ${{ matrix.ido }} for ${{ matrix.os.name }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Ubuntu
- name: Install dependencies (Linux)
shell: bash
if: matrix.os.name == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Build recomp binary (Linux)
shell: bash
if: matrix.os.name == 'linux'
run: |
make -j $(nproc) RELEASE=1 setup
- name: Run the build script (Linux)
shell: bash
if: matrix.os.name == 'linux'
run: |
make -j $(nproc) RELEASE=1 VERSION=${{ matrix.ido }}
- name: Install dependencies (Linux ARM64)
shell: bash
if: matrix.os.name == 'linux-arm'
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu
- name: Build recomp binary (Linux ARM64)
shell: bash
if: matrix.os.name == 'linux-arm'
run: |
make -j $(nproc) RELEASE=1 setup
- name: Run the build script (Linux)
shell: bash
if: matrix.os.name == 'linux-arm'
run: |
make -j $(nproc) RELEASE=1 VERSION=${{ matrix.ido }} CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ STRIP=aarch64-linux-gnu-strip
# MacOS
- name: Install dependencies (MacOS)
shell: bash
if: matrix.os.name == 'macos'
run: |
brew install make
- name: Build recomp binary (MacOS)
shell: bash
if: matrix.os.name == 'macos'
run: |
make -j $(nproc) RELEASE=1 setup
- name: Run the build script (MacOS)
shell: bash
if: matrix.os.name == 'macos'
run: |
make -j $(nproc) RELEASE=1 VERSION=${{ matrix.ido }} TARGET=universal
# Windows
- name: Install dependencies (Windows)
uses: msys2/setup-msys2@v2
if: matrix.os.name == 'windows'
with:
install: |-
gcc
mingw-w64-x86_64-gcc
make
- name: Build recomp binary (Windows)
shell: msys2 {0}
if: matrix.os.name == 'windows'
run: |-
make --jobs RELEASE=1 setup
- name: Run the build script (Windows)
shell: cmd
if: matrix.os.name == 'windows'
run: |-
set MSYSTEM=MSYS
msys2 -c 'make --jobs RELEASE=1 VERSION=${{ matrix.ido }}'
# Archive
- name: Create release archive
shell: bash
run: |
cd build/${{ matrix.ido }}/out
tar -czvf ../../../ido-${{ matrix.ido }}-recomp-${{ matrix.os.name }}.tar.gz *
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: ido-${{ matrix.ido }}-recomp-${{ matrix.os.name }}
path: |
ido-${{ matrix.ido }}-recomp-${{ matrix.os.name }}.tar.gz
- name: Publish release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
ido-${{ matrix.ido }}-recomp-${{ matrix.os.name }}.tar.gz