Skip to content

Commit 297a0eb

Browse files
authored
Merge pull request #496 from biojppm/ci/archs
Ci/archs
2 parents d8f4d01 + 33fd0f8 commit 297a0eb

File tree

11 files changed

+231
-138
lines changed

11 files changed

+231
-138
lines changed

.github/workflows-in/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@ force:
4444

4545

4646
../workflows/%.yml: %.ys $(YS) $(INPUT_FILES)
47-
@chmod u+w ../workflows
4847
@if [ -f "$@" ] ; then chmod a+w $@ ; fi
4948
@echo "# DO NOT EDIT - GENERATED FROM .github/workflows/$<" > $@
5049
@echo >> $@
5150
$(YS) -Y $< >> $@
5251
@chmod a-w $@
53-
@chmod u-w ../workflows
5452
@wc -lm --total=never $< $@
5553

5654

.github/workflows-in/infra.ys

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
steps:
1818
- :: checkout-action
1919
- name: install ys
20-
run: make -C .github/workflows install-ys
20+
run: make -C .github/workflows-in install-ys
2121
- name: generate workflows
22-
run: make -C .github/workflows build
22+
run: make -C .github/workflows-in build
2323
- name: test workflows
2424
run: |
2525
wc --version
2626
wc --help
27-
make -C .github/workflows test
27+
make -C .github/workflows-in test
2828
status=$?
2929
if [ $status != 0 ] ; then
3030
echo "ERROR: generated workflows are out of date"

.github/workflows-in/rarearchs.ys

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,46 @@
44
:: workflow-setup()
55

66
jobs:
7-
rarearchs:
8-
:: setup-job('rarearchs' 'rarearchs')
9-
name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}
10-
runs-on: ubuntu-22.04
7+
xcompile:
8+
:: setup-job('rarearchs' 'xcompile')
9+
name: ${{matrix.arch}}
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
include::
15-
? for
16-
arch qw(aarch64 ppc64le s390x)
17-
std [11 14 17]
18-
bt qw(Debug Release)
19-
: !
20-
std:: std
21-
bt:: bt
22-
arch:: arch
14+
include:
15+
- {arch: aarch64 , tc: aarch64-linux-gnu} # this is armv8
16+
- {arch: armv7 , tc: arm-linux-gnueabihf, flags: -march=armv7+fp}
17+
- {arch: armv6 , tc: arm-linux-gnueabi, flags: -march=armv6+fp}
18+
- {arch: armv5 , tc: arm-linux-gnueabi, flags: -march=armv5te+fp}
19+
- {arch: armv4 , tc: arm-linux-gnueabi, flags: -march=armv4}
20+
- {arch: loongarch64, tc: loongarch64-linux-gnu, version: -14}
21+
- {arch: mips , tc: mips-linux-gnu}
22+
- {arch: mipsel , tc: mipsel-linux-gnu}
23+
- {arch: mips64 , tc: mips64-linux-gnuabi64}
24+
- {arch: mips64el , tc: mips64el-linux-gnuabi64}
25+
- {arch: riscv64 , tc: riscv64-linux-gnu}
26+
- {arch: s390x , tc: s390x-linux-gnu}
27+
- {arch: ppc , tc: powerpc-linux-gnu}
28+
- {arch: ppc64 , tc: powerpc64-linux-gnu}
29+
- {arch: ppc64le , tc: powerpc64le-linux-gnu}
30+
- {arch: sparc64 , tc: sparc64-linux-gnu}
31+
# TODO xtensa!
2332
steps:
2433
- :: checkout-action
25-
- name: test
26-
uses: uraimo/run-on-arch-action@v2.8.1
27-
with:
28-
arch: ${{matrix.arch}}
29-
distro: ubuntu22.04
30-
install:: bash('rarearchs-test-install')
31-
run:: bash('rarearchs-test-run')
34+
- name: install
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y \
38+
gcc${{matrix.version}}-${{matrix.tc}} \
39+
g++${{matrix.version}}-${{matrix.tc}} \
40+
qemu-user-static
41+
- name: info
42+
run: |
43+
${{matrix.tc}}-g++${{matrix.version}} --version
44+
${{matrix.tc}}-g++${{matrix.version}} -dM -E - </dev/null | sort
45+
${{matrix.tc}}-g++${{matrix.version}} ${{matrix.flags}} -dM -E - </dev/null | sort
46+
- :: xcompile-steps("${{matrix.arch}}" "Debug" "11" "${{matrix.flags}}")
47+
- :: xcompile-steps("${{matrix.arch}}" "Release" "11" "${{matrix.flags}}")
48+
- :: xcompile-steps("${{matrix.arch}}" "Debug" "20" "${{matrix.flags}}")
49+
- :: xcompile-steps("${{matrix.arch}}" "Release" "20" "${{matrix.flags}}")

.github/workflows-in/release.ys

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ jobs:
283283

284284
#----------------------------------------------------------------------------
285285
merge_artifacts:
286-
:: setup-job('release' 'release')
286+
:: setup-job('release' 'merge_artifacts')
287287
runs-on: ubuntu-latest
288288
needs: [src, cpp, python_src, python_wheels]
289289
steps:

.github/workflows-in/windows.ys

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ items =::
2121
- {std: 20, name: vs2022/32, os: 2022, gen: Visual Studio 17 2022, arch: Win32}
2222

2323
jobs:
24+
2425
vsdebug:
2526
:: setup-job('windows' 'vsdebug')
2627
name: ${{matrix.name}}bit/c++${{matrix.std}}/debug
@@ -30,6 +31,7 @@ jobs:
3031
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Debug' 'ON' '/MDd /Zi /Ob0 /Od /RTC1')
3132
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Debug' 'OFF' '/MDd /Zi /Ob0 /Od /RTC1')
3233
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Release' 'OFF' '/MD /Os /DNDEBUG')
34+
3335
vsrelease:
3436
:: setup-job('windows' 'vsrelease')
3537
name: ${{matrix.name}}bit/c++${{matrix.std}}/release

.github/workflows-in/ys/common.ys

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,33 @@ defn run-vs-manual-with-flags(gen arch buildtype shared flags="")::
324324
- name:: "run $buildtype ::: $flags shared=$shared"
325325
run:: |
326326
cmake --build build/$buildtype --target ryml-test-run
327+
328+
329+
#----------------------------------------------------------
330+
331+
defn xcompile-steps(arch buildtype std flags="")::
332+
- name: "-------------------------------------------------"
333+
run:: "echo $arch/c++$std/$buildtype"
334+
- name:: "configure $arch/c++$std/$buildtype"
335+
run:: |
336+
touch build
337+
rm -rf build
338+
export C4_EXTERN_DIR=`pwd`/build/extern
339+
cmake -S . -B build \
340+
-DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
341+
-DCMAKE_BUILD_TYPE=$buildtype \
342+
-DCMAKE_CXX_FLAGS=" $flags" \
343+
-DCMAKE_C_FLAGS=" $flags" \
344+
-DC4_CXX_STANDARD=$std \
345+
-DCXX_STANDARD=$std \
346+
-DRYML_DEV=ON \
347+
-DRYML_BUILD_BENCHMARKS=OFF \
348+
-DRYML_SANITIZE=OFF \
349+
-DRYML_LINT=OFF \
350+
-DRYML_VALGRIND=OFF
351+
- name:: "build $arch/c++$std/$buildtype"
352+
run: |
353+
cmake --build build --parallel --target ryml-test-build --verbose
354+
- name:: "test $arch/c++$std/$buildtype"
355+
run: |
356+
cmake --build build --target ryml-test-run

.github/workflows/infra.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
submodules: recursive
3030
fetch-depth: 0
3131
- name: install ys
32-
run: make -C .github/workflows install-ys
32+
run: make -C .github/workflows-in install-ys
3333
- name: generate workflows
34-
run: make -C .github/workflows build
34+
run: make -C .github/workflows-in build
3535
- name: test workflows
3636
run: |
3737
wc --version
3838
wc --help
39-
make -C .github/workflows test
39+
make -C .github/workflows-in test
4040
status=$?
4141
if [ $status != 0 ] ; then
4242
echo "ERROR: generated workflows are out of date"

0 commit comments

Comments
 (0)