diff options
Diffstat (limited to '.github/workflows/cmake-config.yml')
-rw-r--r-- | .github/workflows/cmake-config.yml | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/.github/workflows/cmake-config.yml b/.github/workflows/cmake-config.yml new file mode 100644 index 0000000..0988102 --- /dev/null +++ b/.github/workflows/cmake-config.yml | |||
@@ -0,0 +1,98 @@ | |||
1 | # GitHub Actions workflow to check CMake config. | ||
2 | name: "CMake Check" | ||
3 | |||
4 | on: | ||
5 | push: {} | ||
6 | pull_request: {} | ||
7 | |||
8 | concurrency: | ||
9 | group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | ||
10 | cancel-in-progress: true | ||
11 | |||
12 | jobs: | ||
13 | check: | ||
14 | name: "${{ matrix.os }}" | ||
15 | runs-on: "${{ matrix.os }}" | ||
16 | strategy: | ||
17 | fail-fast: true | ||
18 | matrix: | ||
19 | os: [ "windows-2022", "macos-14", "ubuntu-24.04" ] | ||
20 | defaults: | ||
21 | run: | ||
22 | shell: "bash" | ||
23 | permissions: | ||
24 | contents: read | ||
25 | steps: | ||
26 | - name: "Checkout repository" | ||
27 | uses: actions/checkout@v4 | ||
28 | |||
29 | - name: "Setup Windows dependencies" | ||
30 | if: runner.os == 'Windows' | ||
31 | uses: msys2/setup-msys2@v2 | ||
32 | with: | ||
33 | update: true | ||
34 | install: >- | ||
35 | autoconf | ||
36 | automake | ||
37 | diffutils | ||
38 | libtool | ||
39 | gcc | ||
40 | git | ||
41 | patch | ||
42 | perl | ||
43 | |||
44 | - name: "Setup macOS dependencies" | ||
45 | if: runner.os == 'macOS' | ||
46 | run: brew install automake libtool | ||
47 | |||
48 | - name: "Prepare source tree for build (Windows)" | ||
49 | if: runner.os == 'Windows' | ||
50 | shell: "msys2 {0}" | ||
51 | run: ./autogen.sh | ||
52 | |||
53 | - name: "Prepare source tree for build (Unix)" | ||
54 | if: runner.os != 'Windows' | ||
55 | run: ./autogen.sh | ||
56 | |||
57 | - name: "Configure" | ||
58 | run: | | ||
59 | cmake -S . \ | ||
60 | -B build \ | ||
61 | -D CMAKE_BUILD_TYPE=Release \ | ||
62 | -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../local | ||
63 | |||
64 | - name: "Build" | ||
65 | run: cmake --build build --config Release --verbose | ||
66 | |||
67 | - name: "Install" | ||
68 | run: cmake --install build --config Release | ||
69 | |||
70 | - name: "Consume from the build directory - Configure" | ||
71 | run: | | ||
72 | cmake -S tests/cmake \ | ||
73 | -B consumer-build \ | ||
74 | -D CMAKE_BUILD_TYPE=Release \ | ||
75 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/build | ||
76 | |||
77 | - name: "Consume from the build directory - Build" | ||
78 | run: cmake --build consumer-build --config Release --verbose | ||
79 | |||
80 | - name: "Consume from the install directory (CMAKE_PREFIX_PATH) - Configure" | ||
81 | run: | | ||
82 | cmake -S tests/cmake \ | ||
83 | -B consumer-install-prefix \ | ||
84 | -D CMAKE_BUILD_TYPE=Release \ | ||
85 | -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/../local | ||
86 | |||
87 | - name: "Consume from the install directory (CMAKE_PREFIX_PATH) - Build" | ||
88 | run: cmake --build consumer-install-prefix --config Release --verbose | ||
89 | |||
90 | - name: "Consume from the install directory (LibreSSL_DIR) - Configure" | ||
91 | run: | | ||
92 | cmake -S tests/cmake \ | ||
93 | -B consumer-install-dir \ | ||
94 | -D CMAKE_BUILD_TYPE=Release \ | ||
95 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/../local/lib/cmake/LibreSSL | ||
96 | |||
97 | - name: "Consume from the install directory (LibreSSL_DIR) - Build" | ||
98 | run: cmake --build consumer-install-dir --config Release --verbose | ||