diff options
author | Pierre Wendling <pierre.wendling.4@gmail.com> | 2023-08-06 15:08:28 -0400 |
---|---|---|
committer | Pierre Wendling <pierre.wendling.4@gmail.com> | 2023-08-19 12:16:15 -0400 |
commit | 31391735689077c238623591655753160168ad38 (patch) | |
tree | d0293f02a00a606c080783e2572b0f1a93830284 /.github/workflows | |
parent | a89cd65980153ef60b42cb26d3bef949751f87f1 (diff) | |
download | portable-31391735689077c238623591655753160168ad38.tar.gz portable-31391735689077c238623591655753160168ad38.tar.bz2 portable-31391735689077c238623591655753160168ad38.zip |
CI: Test consuming the exported CMake configs.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/cmake_config.yml | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/.github/workflows/cmake_config.yml b/.github/workflows/cmake_config.yml new file mode 100644 index 0000000..ad1ad75 --- /dev/null +++ b/.github/workflows/cmake_config.yml | |||
@@ -0,0 +1,85 @@ | |||
1 | name: cmake_config | ||
2 | |||
3 | on: [push, pull_request] | ||
4 | |||
5 | jobs: | ||
6 | cmake-check: | ||
7 | defaults: | ||
8 | run: | ||
9 | shell: bash | ||
10 | strategy: | ||
11 | matrix: | ||
12 | os: [windows-latest, macos-latest, ubuntu-latest] | ||
13 | runs-on: ${{ matrix.os }} | ||
14 | continue-on-error: false | ||
15 | name: ${{ matrix.os }} | ||
16 | steps: | ||
17 | - name: Setup Windows dependencies | ||
18 | if: runner.os == 'Windows' | ||
19 | uses: msys2/setup-msys2@v2 | ||
20 | with: | ||
21 | update: true | ||
22 | install: >- | ||
23 | autoconf | ||
24 | automake | ||
25 | diffutils | ||
26 | libtool | ||
27 | gcc | ||
28 | git | ||
29 | patch | ||
30 | perl | ||
31 | |||
32 | - name: Setup macOS dependencies | ||
33 | if: runner.os == 'macOS' | ||
34 | run: brew install automake | ||
35 | |||
36 | - uses: actions/checkout@main | ||
37 | |||
38 | - name: Prepare source tree for build (Windows) | ||
39 | if: runner.os == 'Windows' | ||
40 | run: ./autogen.sh | ||
41 | shell: msys2 {0} | ||
42 | |||
43 | - name: Prepare source tree for build (Unix) | ||
44 | if: runner.os != 'Windows' | ||
45 | run: ./autogen.sh | ||
46 | |||
47 | - name: Configure | ||
48 | run: | | ||
49 | cmake -S . \ | ||
50 | -B build \ | ||
51 | -D CMAKE_BUILD_TYPE=Release \ | ||
52 | -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../local | ||
53 | |||
54 | - name: Build | ||
55 | run: cmake --build build --config Release --verbose | ||
56 | |||
57 | - name: Install | ||
58 | run: cmake --install build --config Release | ||
59 | |||
60 | - name: Consume from the build directory - Configure | ||
61 | run: | | ||
62 | cmake -S tests/cmake \ | ||
63 | -B consumer-build \ | ||
64 | -D CMAKE_BUILD_TYPE=Release \ | ||
65 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/build | ||
66 | - name: Consume from the build directory - Build | ||
67 | run: cmake --build consumer-build --config Release --verbose | ||
68 | |||
69 | - name: Consume from the install directory (CMAKE_PREFIX_PATH) - Configure | ||
70 | run: | | ||
71 | cmake -S tests/cmake \ | ||
72 | -B consumer-install-prefix \ | ||
73 | -D CMAKE_BUILD_TYPE=Release \ | ||
74 | -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/../local | ||
75 | - name: Consume from the install directory (CMAKE_PREFIX_PATH) - Build | ||
76 | run: cmake --build consumer-install-prefix --config Release --verbose | ||
77 | |||
78 | - name: Consume from the install directory (LibreSSL_DIR) - Configure | ||
79 | run: | | ||
80 | cmake -S tests/cmake \ | ||
81 | -B consumer-install-dir \ | ||
82 | -D CMAKE_BUILD_TYPE=Release \ | ||
83 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/../local/lib/cmake/LibreSSL | ||
84 | - name: Consume from the install directory (LibreSSL_DIR) - Build | ||
85 | run: cmake --build consumer-install-dir --config Release --verbose | ||