-
Notifications
You must be signed in to change notification settings - Fork 55
144 lines (134 loc) · 7.66 KB
/
dockcross.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
---
name: Dockcross
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
# Disable because it seems there is a problem with doctest on ARM
#android:
# name: ${{ matrix.image_name }} (c++${{ matrix.standard }})
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# image_name: [ android-arm, android-arm64, android-x86, android-x86_64 ]
# standard: [ 11, 14, 17, 20 ]
# steps:
# - name: 📥 Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: 📂 Load .env file
# if: hashFiles('.github/workflows/.env') != ''
# uses: xom9ikk/dotenv@v2
# with:
# path: .github/workflows
# - name: ✨ Make script dockcross-${{ matrix.image_name }}
# run: docker run --rm dockcross/${{ matrix.image_name }} > ./dockcross-${{ matrix.image_name }}; chmod +x ./dockcross-${{ matrix.image_name }}
# - name: 🔧 Configure
# run: ./dockcross-${{ matrix.image_name }} cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BINARY_PREFIX }} -G Ninja -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D CMAKE_CXX_STANDARD=${{ matrix.standard }} -D CMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_PREFIX }} -D CPPTERMINAL_ENABLE_DOCS=OFF
# - name: ⚙️ Build
# run: ./dockcross-${{ matrix.image_name }} cmake --build ${{ env.CMAKE_BINARY_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel ${{ env.CMAKE_NUMBER_JOBS }}
# - name: 🧪 Test
# run: ./dockcross-${{ matrix.image_name }} ctest --test-dir ${{ env.CMAKE_BINARY_PREFIX }} -C ${{ env.CMAKE_BUILD_TYPE }} --output-on-failure
# - name: 🎉 Install
# run: ./dockcross-${{ matrix.image_name }} cmake --install ${{ env.CMAKE_BINARY_PREFIX }} --prefix ${{ env.CMAKE_INSTALL_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }}
# - name: ✅ Run examples
# run: ./dockcross-${{ matrix.image_name }} bash ci/examples.sh
linux:
name: ${{ matrix.image_name }} (c++${{ matrix.standard }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Some have problems : linux-armv6-musl, linux-armv7l-musl, linux-arm64-musl, linux-riscv64, linux-m68k-uclibc, linux-riscv32,linux-armv7
image_name: [ linux-arm64, linux-armv5, linux-armv5-musl, linux-armv5-uclibc, linux-armv6, linux-armv7a, linux-mips, linux-mipsel-lts, linux-s390x, linux-ppc64le,
linux-xtensa-uclibc, linux-x86, linux-x64, linux-x64-clang, linux-x64-tinycc ]
standard: [ 11, 14, 17, 20 ]
steps:
- uses: ammaraskar/gcc-problem-matcher@master
- name: 📥 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📂 Load .env file
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows
- name: ✨ Make script dockcross-${{ matrix.image_name }}
run: docker run --rm dockcross/${{ matrix.image_name }} > ./dockcross-${{ matrix.image_name }}; chmod +x ./dockcross-${{ matrix.image_name }}
- name: 🔧 Configure
run: ./dockcross-${{ matrix.image_name }} cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BINARY_PREFIX }} -G Ninja -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D CMAKE_CXX_STANDARD=${{ matrix.standard }} -D CMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_PREFIX }} -D CPPTERMINAL_ENABLE_DOCS=OFF
- name: ⚙️ Build
run: ./dockcross-${{ matrix.image_name }} cmake --build ${{ env.CMAKE_BINARY_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel ${{ env.CMAKE_NUMBER_JOBS }}
- name: 🧪 Test
run: ./dockcross-${{ matrix.image_name }} ctest --test-dir ${{ env.CMAKE_BINARY_PREFIX }} -C ${{ env.CMAKE_BUILD_TYPE }} --output-on-failure
- name: 🎉 Install
run: ./dockcross-${{ matrix.image_name }} cmake --install ${{ env.CMAKE_BINARY_PREFIX }} --prefix ${{ env.CMAKE_INSTALL_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }}
windows:
name: ${{ matrix.image_name }} (c++${{ matrix.standard }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Some have problems : windows-shared-x86, windows-shared-x64, windows-shared-x64-posix, windows-armv7, windows-arm64
# TODO arm need CMAKE_BUILD_WITH_INSTALL_RPATH
image_name: [ windows-static-x86, windows-static-x64, windows-static-x64-posix ]
standard: [ 11, 14, 17, 20 ]
steps:
- uses: ammaraskar/gcc-problem-matcher@master
- name: 📥 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📂 Load .env file
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows
- name: ✨ Make script dockcross-${{ matrix.image_name }}
run: docker run --rm dockcross/${{ matrix.image_name }} > ./dockcross-${{ matrix.image_name }}; chmod +x ./dockcross-${{ matrix.image_name }}
- name: 🔧 Configure
run: ./dockcross-${{ matrix.image_name }} cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BINARY_PREFIX }} -G Ninja -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D CMAKE_CXX_STANDARD=${{ matrix.standard }} -D CMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_PREFIX }} -D CPPTERMINAL_ENABLE_DOCS=OFF
- name: ⚙️ Build
run: ./dockcross-${{ matrix.image_name }} cmake --build ${{ env.CMAKE_BINARY_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel ${{ env.CMAKE_NUMBER_JOBS }}
- name: 🧪 Test
run: ./dockcross-${{ matrix.image_name }} ctest --test-dir ${{ env.CMAKE_BINARY_PREFIX }} -C ${{ env.CMAKE_BUILD_TYPE }} --output-on-failure
- name: 🎉 Install
run: ./dockcross-${{ matrix.image_name }} cmake --install ${{ env.CMAKE_BINARY_PREFIX }} --prefix ${{ env.CMAKE_INSTALL_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }}
web:
name: ${{ matrix.image_name }} (c++${{ matrix.standard }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# WARNING Problem with doctest : suppress Tests !!!
# web-wasi has not <thread> !
image_name: [ web-wasm ]
standard: [ 11, 14, 17, 20 ]
steps:
- uses: ammaraskar/gcc-problem-matcher@master
- name: 📥 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📂 Load .env file
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows
- name: ✨ Make script dockcross-${{ matrix.image_name }}
run: docker run --rm dockcross/${{ matrix.image_name }} > ./dockcross-${{ matrix.image_name }}; chmod +x ./dockcross-${{ matrix.image_name }}
- name: 🔧 Configure
run: ./dockcross-${{ matrix.image_name }} cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BINARY_PREFIX }} -G Ninja -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D CMAKE_CXX_STANDARD=${{ matrix.standard }} -D CMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_PREFIX }} -D CPPTERMINAL_ENABLE_DOCS=OFF
- name: ⚙️ Build
run: ./dockcross-${{ matrix.image_name }} cmake --build ${{ env.CMAKE_BINARY_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel ${{ env.CMAKE_NUMBER_JOBS }}
#- name: 🧪 Test
# run: ./dockcross-${{ matrix.image_name }} ctest --test-dir ${{ env.CMAKE_BINARY_PREFIX }} -C ${{ env.CMAKE_BUILD_TYPE }} --output-on-failure
- name: 🎉 Install
run: ./dockcross-${{ matrix.image_name }} cmake --install ${{ env.CMAKE_BINARY_PREFIX }} --prefix ${{ env.CMAKE_INSTALL_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }}