-
Notifications
You must be signed in to change notification settings - Fork 111
202 lines (176 loc) · 6.61 KB
/
Copy pathtest-distribution.yml
File metadata and controls
202 lines (176 loc) · 6.61 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
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
198
199
200
201
202
name: Test Distribution
on:
workflow_call:
inputs:
release_id:
required: true
type: string
jobs:
linux-test:
timeout-minutes: 30
runs-on: ${{ matrix.runner }}
container:
image: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
platform: [ 'x86-64', 'arm64']
os: ["ubuntu:20.04", "ubuntu:22.04", "fedora:39"]
include:
- platform: 'x86-64'
runner: ubuntu-latest
- platform: 'arm64'
runner: [ self-hosted, linux-arm64 ]
- os: "ubuntu:20.04"
name: "ubuntu20"
c-compiler: /usr/bin/clang-11
cxx-compiler: /usr/bin/clang++-11
- os: "ubuntu:22.04"
name: "ubuntu22"
c-compiler: /usr/bin/clang-14
cxx-compiler: /usr/bin/clang++-14
- os: "fedora:39"
name: "fedora39"
c-compiler: /usr/bin/clang-17
cxx-compiler: /usr/bin/clang++-17
exclude:
- os: "fedora:39"
platform: 'arm64'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{needs.setup.outputs.version_tag}}
- name: Download Ubuntu x86-64 Release
if: ${{ matrix.os != 'fedora:39' && matrix.platform == 'x86-64' }}
uses: robinraju/release-downloader@v1.11
with:
releaseId: ${{inputs.release_id}}
fileName: "*${{matrix.name}}-dev.deb"
- name: Install Ubuntu x86-64 Release
if: ${{ matrix.os != 'fedora:39' && matrix.platform == 'x86-64' }}
run: |
export DEBIAN_FRONTEND=noninteractive && apt-get -y update && apt-get -y upgrade && \
apt-get -y install sudo xvfb curl libssl-dev python3-distutils python3-pip && \
apt-get -y install libstdc++-10-dev && \
apt-get -y install ./*${{matrix.name}}-dev.deb
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade -r ./requirements/python.txt
- name: Download Ubuntu arm64 Release
if: ${{ matrix.os != 'fedora:39' && matrix.platform == 'arm64' }}
uses: robinraju/release-downloader@v1.11
with:
releaseId: ${{inputs.release_id}}
fileName: "*${{matrix.name}}-arm64-dev.deb"
- name: Install Ubuntu arm64 Release
if: ${{ matrix.os != 'fedora:39' && matrix.platform == 'arm64' }}
run: |
export DEBIAN_FRONTEND=noninteractive && apt-get -y update && apt-get -y upgrade && \
apt-get -y install sudo xvfb curl libssl-dev python3-distutils python3-pip && \
apt-get -y install libstdc++-10-dev && \
apt-get -y install ./*${{matrix.name}}-arm64-dev.deb
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade -r ./requirements/python.txt
- name: Download Fedora Release
if: ${{ matrix.os == 'fedora:39' }}
uses: robinraju/release-downloader@v1.11
with:
releaseId: ${{inputs.release_id}}
fileName: "*.rpm"
- name: Install Fedora Release
if: ${{ matrix.os == 'fedora:39' }}
run: |
dnf --refresh -y upgrade
dnf -y --setopt=install_weak_deps=False install xorg-x11-server-Xvfb mesa-dri-drivers mesa-libGL-devel libXi-devel util-linux python3 python3-pip
dnf -y --setopt=install_weak_deps=False install ./*.rpm
python3 -m pip install --upgrade -r ./requirements/python.txt
- name: Install supported compiler
if: ${{ matrix.os == 'ubuntu:20.04' }}
run: |
apt-get -y install clang-11
- name: Install supported compiler
if: ${{ matrix.os == 'ubuntu:22.04' }}
run: |
apt-get -y install clang-14
- name: Run MeshViewer
if: always()
run: xvfb-run -a MeshViewer -hidden -noEventLoop -unloadPluginsAtEnd
- name: Show meshconv help
if: always()
run: meshconv --help
- name: Build C++ examples
if: always()
working-directory: examples/cpp-examples
run: |
mkdir build && \
cd build && \
cmake .. -DCMAKE_CXX_COMPILER=${{matrix.cxx-compiler}} && \
cmake --build . && \
./MeshModification
- name: Build C examples
if: always()
working-directory: examples/c-examples
run: |
cmake -S . -B build -DCMAKE_C_COMPILER=${{matrix.c-compiler}} && \
cmake --build build
- name: Ubuntu python test
if: ${{ always() && matrix.os != 'fedora:39' }}
env:
PYTHONPATH: /usr/local/lib/MeshLib/
working-directory: test_python
run: python3 -m pytest -s -v
- name: Fedora python test
if: ${{ always() && matrix.os == 'fedora:39' }}
env:
PYTHONPATH: /usr/local/lib64/MeshLib/
working-directory: test_python
run: python3 -m pytest -s -v
macos-test:
timeout-minutes: 30
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
os: [ x64, arm]
include:
- os: x64
runner: macos-13 # github hosted
- os: arm
runner: macos-latest # github hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{needs.setup.outputs.version_tag}}
- name: Download Distributive
uses: robinraju/release-downloader@v1.11
with:
releaseId: ${{inputs.release_id}}
fileName: "*${{matrix.os}}.pkg"
- name: Install Pkg
run: sudo installer -pkg meshlib_*${{matrix.os}}.pkg -target /
# [error] NSGL: Failed to find a suitable pixel format
- name: Run MeshViewer
if: always()
run: /Library/Frameworks/MeshLib.framework/Versions/Current/bin/MeshViewer -tryHidden -noEventLoop -unloadPluginsAtEnd
- name: Show meshconv help
if: always()
run: /Library/Frameworks/MeshLib.framework/Versions/Current/bin/meshconv --help
- name: Build C examples
if: always()
working-directory: examples/c-examples
run: |
cmake -S . -B build -DCMAKE_C_COMPILER=/usr/bin/clang && \
cmake --build build
- name: Install MeshLib requirements
run: |
xargs brew install < /Library/Frameworks/MeshLib.framework/Versions/Current/requirements/macos.txt || true
- name: Build C++ examples
if: always()
working-directory: examples/cpp-examples
run: |
mkdir build && \
cd build && \
cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++ && \
cmake --build . && \
./MeshModification