Skip to content

Commit 05c774a

Browse files
committed
Merge branch 'citest' into citest-cmake-windows
2 parents 6f36520 + 22246b9 commit 05c774a

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: cmake-cross-mingw
2+
3+
on:
4+
push:
5+
branches: [
6+
"master",
7+
"devel",
8+
"citest",
9+
"citest-cmake",
10+
"citest-cmake-cross-mingw" ]
11+
tags:
12+
- '**'
13+
pull_request:
14+
branches: [ "master", "devel" ]
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
# build_type: [ x86_64, i686 ]
22+
build_type: [ x86_64 ]
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: install prereq.
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y check gcc-mingw-w64-x86-64-win32
29+
- name: cmake_shared_configure
30+
run: |
31+
CC=${{ matrix.build_type }}-w64-mingw32-gcc \
32+
util/cmake_shared_configure \
33+
-DADFLIB_ENABLE_TESTS=OFF
34+
- name: cmake_shared_build
35+
run: util/cmake_shared_build
36+
# - name: cmake_shared_test
37+
# run: util/cmake_shared_test
38+
# - name: cmake_shared_install
39+
# run: sudo bash util/cmake_shared_install
40+
# - name: check installation
41+
# run: find /usr/local -iname '*adf*'
42+
# - name: update ldconfig
43+
# run: sudo ldconfig
44+
# - name: test command-line utils
45+
# run: ./tests/examples/test_all_examples.sh /usr/local/bin
46+
- name: check build output files
47+
run: find build/
48+
- name: prepare artifact
49+
run: |
50+
mkdir -vp bin
51+
cp -v build/shared/src/libadf* bin/
52+
cp -v build/shared/examples/*.exe bin/
53+
mkdir -v include
54+
cp -vR src/*.h include
55+
- uses: actions/upload-artifact@v4
56+
with:
57+
# name: adflib-${{ env.ADFLIB_TAG }}-mingw
58+
name: adflib-mingw-${{ matrix.build_type }}
59+
path: |
60+
AUTHORS
61+
BUGS.md
62+
ChangeLog
63+
COPYING*
64+
NOTES.md
65+
README.md
66+
TODO
67+
bin
68+
doc
69+
include
70+
71+
test:
72+
needs: build
73+
runs-on: windows-latest
74+
strategy:
75+
matrix:
76+
# build_type: [ x86_64, i686 ]
77+
build_type: [ x86_64 ]
78+
steps:
79+
- uses: actions/checkout@v4
80+
- uses: actions/download-artifact@v4
81+
with:
82+
# name: adflib-${{ env.ADFLIB_TAG }}-mingw
83+
name: adflib-mingw-${{ matrix.build_type }}
84+
path: .
85+
- name: list files extracted from the artifact
86+
shell: bash
87+
run: |
88+
find bin/
89+
find include/
90+
- name: show properties of binaries
91+
shell: bash
92+
run: ldd bin/unadf
93+
- name: configure tests
94+
shell: bash
95+
run: |
96+
cat tests/config.sh.in_cmake | \
97+
sed -e 's@\${PROJECT_BINARY_DIR}@./bin/@' \
98+
-e 's@\${PROJECT_SOURCE_DIR}@./@' \
99+
> tests/config.sh
100+
cat tests/config.sh
101+
- name: test command-line utils
102+
shell: bash
103+
run: |
104+
tests/examples/test_examples_basic.sh bin/
105+
tests/examples/test_all_examples.sh bin/
106+
- name: test installed command-line utils (2)
107+
shell: bash
108+
run: |
109+
./tests/examples2/run_all_tests.sh bin
110+
- name: store logs from failed tests
111+
if: failure()
112+
uses: actions/upload-artifact@v4
113+
with:
114+
name: cmake_cross_mingw_${{ matrix.build_type }}_logs_failed_tests
115+
path: |
116+
cmake/shared/Testing/

0 commit comments

Comments
 (0)