-
Notifications
You must be signed in to change notification settings - Fork 11
123 lines (105 loc) · 3.38 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
name: Build test
on:
# Trigger the workflow on push or pull requests.
push:
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
# x86-64 gcc
- arch: x86_64
cc_pkg: gcc-x86-64-linux-gnu
cxx_pkg: g++-x86-64-linux-gnu
cc: x86_64-linux-gnu-gcc
cxx: x86_64-linux-gnu-g++
# x86-64 clang
- arch: x86_64
cc_pkg: clang
cxx_pkg: clang
cc: clang
cxx: clang++
# x86 (32-bit) gcc
- arch: i686
cc_pkg: gcc-i686-linux-gnu
cxx_pkg: g++-i686-linux-gnu
cc: i686-linux-gnu-gcc
cxx: i686-linux-gnu-g++
# aarch64 gcc
- arch: aarch64
cc_pkg: gcc-aarch64-linux-gnu
cxx_pkg: g++-aarch64-linux-gnu
cc: aarch64-linux-gnu-gcc
cxx: aarch64-linux-gnu-g++
# arm (32-bit) gcc
- arch: arm
cc_pkg: gcc-arm-linux-gnueabi
cxx_pkg: g++-arm-linux-gnueabi
cc: arm-linux-gnueabi-gcc
cxx: arm-linux-gnueabi-g++
# powerpc64
- arch: powerpc64
cc_pkg: gcc-powerpc64-linux-gnu
cxx_pkg: g++-powerpc64-linux-gnu
cc: powerpc64-linux-gnu-gcc
cxx: powerpc64-linux-gnu-g++
# powerpc
- arch: powerpc
cc_pkg: gcc-powerpc-linux-gnu
cxx_pkg: g++-powerpc-linux-gnu
cc: powerpc-linux-gnu-gcc
cxx: powerpc-linux-gnu-g++
# alpha
- arch: alpha
cc_pkg: gcc-alpha-linux-gnu
cxx_pkg: g++-alpha-linux-gnu
cc: alpha-linux-gnu-gcc
cxx: alpha-linux-gnu-g++
# mips64
- arch: mips64
cc_pkg: gcc-mips64-linux-gnuabi64
cxx_pkg: g++-mips64-linux-gnuabi64
cc: mips64-linux-gnuabi64-gcc
cxx: mips64-linux-gnuabi64-g++
# mips
- arch: mips
cc_pkg: gcc-mips-linux-gnu
cxx_pkg: g++-mips-linux-gnu
cc: mips-linux-gnu-gcc
cxx: mips-linux-gnu-g++
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Install Compilers
run: |
if [[ "${{matrix.cc_pkg}}" == "clang" ]]; then \
wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh; \
sudo bash /tmp/llvm.sh 17; \
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 400; \
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 400; \
else \
sudo apt-get update -y; \
sudo apt-get install -y ${{matrix.cc_pkg}} ${{matrix.cxx_pkg}}; \
fi;
- name: Install GTK+3
run: |
if [[ "${{matrix.arch}}" == "x86_64" ]]; then \
sudo apt-get install -y libgtk-3-dev; \
fi;
- name: Display compiler versions
run: |
${{matrix.cc}} --version;
${{matrix.cxx}} --version;
- name: Build
run: |
./configure --cc=${{matrix.cc}} --cxx=${{matrix.cxx}};
make -j$(nproc);
- name: Build with GUI
run: |
if [[ "${{matrix.arch}}" == "x86_64" ]]; then \
./configure --cc=${{matrix.cc}} --cxx=${{matrix.cxx}} --gui; \
make -j$(nproc); \
fi;