-
Notifications
You must be signed in to change notification settings - Fork 1
160 lines (134 loc) · 5.26 KB
/
test.yml
File metadata and controls
160 lines (134 loc) · 5.26 KB
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
name: Test
on:
push:
paths-ignore:
- 'README.md'
- '.gitignore'
- 'LICENSE'
- 'CHANGELOG.md'
- 'doc/**'
- 'tools/**'
jobs:
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- { os: macos-latest, name: 'macOS latest' }
- { os: windows-latest, module: true, name: 'Windows latest' }
- { os: ubuntu-latest, compiler: gcc, version: 11, name: 'GCC 11' }
- { os: ubuntu-latest, compiler: gcc, version: 12, name: 'GCC 12' }
- { os: ubuntu-latest, compiler: gcc, version: 13, name: 'GCC 13' }
- { os: ubuntu-24.04, compiler: gcc, version: 14, module: true, name: 'GCC 14' }
- { os: ubuntu-22.04, compiler: clang, version: 13, name: 'Clang 13' }
- { os: ubuntu-22.04, compiler: clang ,version: 14, name: 'Clang 14' }
- { os: ubuntu-22.04, compiler: clang, version: 15, name: 'Clang 15' }
- { os: ubuntu-22.04, compiler: clang, version: 16, name: 'Clang 16' }
- { os: ubuntu-latest, compiler: clang, version: 17, name: 'Clang 17' }
- { os: ubuntu-latest, compiler: clang, version: 18, module: true, name: 'Clang 13' }
- { os: ubuntu-latest, compiler: clang, version: 19, module: true, name: 'Clang 19' }
- { os: ubuntu-latest, compiler: clang, version: 20, module: true, name: 'Clang 20' }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: System Setup
shell: bash
run: |
if [[ '${{ matrix.os }}' == ubuntu-* ]]; then
if [[ '${{ matrix.compiler }}' == 'clang' ]]; then
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh ${{ matrix.version }}
sudo apt-get install -y clang-tools-${{ matrix.version }}
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
if [[ '${{ matrix.compiler }}' == 'gcc' ]]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
fi
mkdir bin
wget -qO- https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip | \
gunzip > bin/ninja
chmod a+x bin/ninja
echo PATH=`pwd`/bin:$PATH >> $GITHUB_ENV
echo "CMAKE_GENERATOR=-GNinja" >> $GITHUB_ENV
fi
if [[ '${{ matrix.module}}' == 'true' ]]; then
echo "CMAKE_ARGS=-DISPTR_ENABLE_MODULE=ON" >> $GITHUB_ENV
fi
- name: Configure
shell: bash
run: |
cmake $CMAKE_GENERATOR -S . -B build $CMAKE_ARGS -DISPTR_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release
- name: Build and Test
shell: bash
run: |
cmake --build build --config Release --target run-test
container:
runs-on: ubuntu-latest
name: ${{ matrix.name }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
include:
- {container: gcc:15.1, module: true, name: 'GCC 15'}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: System Setup
shell: bash
run: |
apt-get update
apt-get install -y python3-dev
export CMAKE_VERSION=3.28.6
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& /tmp/cmake-install.sh --skip-license --prefix=/usr \
rm -f /tmp/cmake-install.sh
wget -qO- https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip | \
gunzip > /usr/bin/ninja
chmod a+x /usr/bin/ninja
echo "CMAKE_GENERATOR=-GNinja" >> $GITHUB_ENV
if [[ '${{ matrix.module}}' == 'true' ]]; then
echo "CMAKE_ARGS=-DISPTR_ENABLE_MODULE=ON" >> $GITHUB_ENV
fi
- name: Configure
shell: bash
run: |
cmake $CMAKE_GENERATOR -S . -B build $CMAKE_ARGS -DISPTR_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release
- name: Build and Test
shell: bash
run: |
cmake --build build --config Release --target run-test
big-endian:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-powerpc-linux-gnu g++-powerpc-linux-gnu qemu-user-binfmt
- name: Configure
run: |
export CC=powerpc-linux-gnu-gcc
export CXX=powerpc-linux-gnu-g++
export QEMU_LD_PREFIX=/usr/powerpc-linux-gnu/
cmake -GNinja -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=powerpc
- name: Build and Test
shell: bash
run: |
export QEMU_LD_PREFIX=/usr/powerpc-linux-gnu/
cmake --build build --config Release --target run-test