-
Notifications
You must be signed in to change notification settings - Fork 98
169 lines (166 loc) · 9.18 KB
/
rarearchs.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: rarearchs
defaults:
run:
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash -e -x {0}
on:
# https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
rarearchs:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip rarearchs')) ||
contains(github.event.head_commit.message, 'only rarearchs')
name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}${{matrix.suffix}}
continue-on-error: true
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
#- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O0, cxxflags: ' -O0 '}
#- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O1, cxxflags: ' -O1 '}
#- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O2, cxxflags: ' -O2 '}
#- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O3, cxxflags: ' -O3 '}
#- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O2dbg, cxxflags: ' -O2 -g -DNDEBUG '}
#- {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04, suffix: }
#- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: }
#
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O0 , cxxflags: ' -O0 '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O0NDEBUG , cxxflags: ' -O0 -DNDEBUG '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O0gNDEBUG, cxxflags: ' -O0 -DNDEBUG -g '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O1 , cxxflags: ' -O1 '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O1NDEBUG , cxxflags: ' -O1 -DNDEBUG '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O1gNDEBUG, cxxflags: ' -O1 -DNDEBUG -g '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O2 , cxxflags: ' -O2 '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O2NDEBUG , cxxflags: ' -O2 -DNDEBUG '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O2gNDEBUG, cxxflags: ' -O2 -DNDEBUG -g '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O3 , cxxflags: ' -O3 '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O3NDEBUG , cxxflags: ' -O3 -DNDEBUG '}
- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O3gNDEBUG, cxxflags: ' -O3 -DNDEBUG -g '}
#- {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04, suffix: }
#- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: }
#
#- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O0, cxxflags: ' -O0 '}
#- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O1, cxxflags: ' -O1 '}
#- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O2, cxxflags: ' -O2 '}
#- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O3, cxxflags: ' -O3 '}
#- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O2dbg, cxxflags: ' -O2 -g -DNDEBUG '}
#- {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04, suffix: }
#- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: }
#
#- {std: 11, bt: Debug , arch: armv6 , distro: bullseye, suffix: }
#- {std: 11, bt: Release, arch: armv6 , distro: bullseye, suffix: }
#- {std: 14, bt: Debug , arch: armv6 , distro: bullseye, suffix: }
#- {std: 14, bt: Release, arch: armv6 , distro: bullseye, suffix: }
#- {std: 17, bt: Debug , arch: armv6 , distro: bullseye, suffix: }
#- {std: 17, bt: Release, arch: armv6 , distro: bullseye, suffix: }
#
#- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04, suffix: }
#- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04, suffix: }
#- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04, suffix: }
#- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04, suffix: }
steps:
- {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}}
- name: test
uses: uraimo/[email protected]
with:
arch: ${{matrix.arch}}
distro: ${{matrix.distro}}
install: |
set -x
start_time=$SECONDS
time apt-get update -y
time apt-get install -y \
git \
build-essential
# arm platforms need an up-to-date cmake:
# https://gitlab.kitware.com/cmake/cmake/-/issues/20568
if [ "${{matrix.arch}}" == "armv6" ] || [ "${{matrix.arch}}" == "armv7" ] ; then
time apt-get install -y \
gpg \
wget \
apt-transport-https
wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
time apt-get update -y
rm /usr/share/keyrings/kitware-archive-keyring.gpg
time apt-get install kitware-archive-keyring
time apt-get update -y
fi
time apt-get install -y cmake cmake-data
cmake --version
echo "install took $((SECONDS - start_time))"
run: |
set -xe
start_time=$SECONDS
uname -a
pwd
ls -lFhp .
#
# https://stackoverflow.com/questions/5470257/how-to-see-which-flags-march-native-will-activate
echo | c++ -O0 -Q -E -v - </dev/null 2>&1
echo | c++ -O0 -Q -c --help=optimizers --help=target
echo | c++ -O0 -dM -E - | sort
echo -----
echo | c++ -O1 -Q -E -v - </dev/null 2>&1
echo | c++ -O1 -Q -c --help=optimizers --help=target
echo | c++ -O1 -dM -E - | sort
echo -----
echo | c++ -O2 -Q -E -v - </dev/null 2>&1
echo | c++ -O2 -Q -c --help=optimizers --help=target
echo | c++ -O2 -dM -E - | sort
echo -----
echo | c++ -O3 -Q -E -v - </dev/null 2>&1
echo | c++ -O3 -Q -c --help=optimizers --help=target
echo | c++ -O3 -dM -E - | sort
echo =====
#
bdir=build_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}}
idir=install_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}}
mkdir -p $bdir
#
cmd="cmake -S . -B $bdir \
-DCMAKE_INSTALL_PREFIX=$idir \
-DCMAKE_BUILD_TYPE=${{matrix.bt}} \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DCXX_STANDARD=${{matrix.std}} \
-DRYML_DEV=ON \
-DRYML_TEST_SUITE=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_SANITIZE=OFF \
-DRYML_LINT=OFF \
-DRYML_VALGRIND=OFF"
echo $cmd
if [ -z "${{matrix.cxxflags}}" ] ; then
time $cmd
else
time $cmd -DCMAKE_CXX_FLAGS_RELEASE:STRING="${{matrix.cxxflags}}"
fi
#
time cmake --build $bdir --verbose -j --target ryml-test-build
#
time cmake --build $bdir --target ryml-test-run
echo "run took $((SECONDS - start_time))"