aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJoshua Sing <joshua@joshuasing.dev>2025-01-11 20:25:23 +1100
committerJoshua Sing <joshua@joshuasing.dev>2025-01-11 20:25:23 +1100
commit7a9c5f18b56850ab53d76740d0a3710a7907746b (patch)
treee52a3d57926f258fba4e5c90cd1a4469f15d4992 /.github
parent0d8a436dbea57a40a8aea9b027cb696aa9322e1c (diff)
downloadportable-7a9c5f18b56850ab53d76740d0a3710a7907746b.tar.gz
portable-7a9c5f18b56850ab53d76740d0a3710a7907746b.tar.bz2
portable-7a9c5f18b56850ab53d76740d0a3710a7907746b.zip
ci: improve cmake config workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/cmake-config.yml98
-rw-r--r--.github/workflows/cmake_config.yml89
2 files changed, 98 insertions, 89 deletions
diff --git a/.github/workflows/cmake-config.yml b/.github/workflows/cmake-config.yml
new file mode 100644
index 0000000..3858773
--- /dev/null
+++ b/.github/workflows/cmake-config.yml
@@ -0,0 +1,98 @@
1# GitHub Actions workflow to test CMake config.
2name: "CMake Config"
3
4on:
5 push: {}
6 pull_request: {}
7
8concurrency:
9 group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
10 cancel-in-progress: true
11
12jobs:
13 check:
14 name: "Check (${{ 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
diff --git a/.github/workflows/cmake_config.yml b/.github/workflows/cmake_config.yml
deleted file mode 100644
index f22622c..0000000
--- a/.github/workflows/cmake_config.yml
+++ /dev/null
@@ -1,89 +0,0 @@
1name: cmake_config
2
3on: [push, pull_request]
4
5concurrency:
6 group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
7 cancel-in-progress: true
8
9jobs:
10 cmake-check:
11 defaults:
12 run:
13 shell: bash
14 strategy:
15 matrix:
16 os: [windows-latest, macos-latest, ubuntu-24.04]
17 runs-on: ${{ matrix.os }}
18 continue-on-error: false
19 name: ${{ matrix.os }}
20 steps:
21 - name: Setup Windows dependencies
22 if: runner.os == 'Windows'
23 uses: msys2/setup-msys2@v2
24 with:
25 update: true
26 install: >-
27 autoconf
28 automake
29 diffutils
30 libtool
31 gcc
32 git
33 patch
34 perl
35
36 - name: Setup macOS dependencies
37 if: runner.os == 'macOS'
38 run: brew install automake libtool
39
40 - uses: actions/checkout@v4
41
42 - name: Prepare source tree for build (Windows)
43 if: runner.os == 'Windows'
44 run: ./autogen.sh
45 shell: msys2 {0}
46
47 - name: Prepare source tree for build (Unix)
48 if: runner.os != 'Windows'
49 run: ./autogen.sh
50
51 - name: Configure
52 run: |
53 cmake -S . \
54 -B build \
55 -D CMAKE_BUILD_TYPE=Release \
56 -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../local
57
58 - name: Build
59 run: cmake --build build --config Release --verbose
60
61 - name: Install
62 run: cmake --install build --config Release
63
64 - name: Consume from the build directory - Configure
65 run: |
66 cmake -S tests/cmake \
67 -B consumer-build \
68 -D CMAKE_BUILD_TYPE=Release \
69 -D LibreSSL_DIR=$GITHUB_WORKSPACE/build
70 - name: Consume from the build directory - Build
71 run: cmake --build consumer-build --config Release --verbose
72
73 - name: Consume from the install directory (CMAKE_PREFIX_PATH) - Configure
74 run: |
75 cmake -S tests/cmake \
76 -B consumer-install-prefix \
77 -D CMAKE_BUILD_TYPE=Release \
78 -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/../local
79 - name: Consume from the install directory (CMAKE_PREFIX_PATH) - Build
80 run: cmake --build consumer-install-prefix --config Release --verbose
81
82 - name: Consume from the install directory (LibreSSL_DIR) - Configure
83 run: |
84 cmake -S tests/cmake \
85 -B consumer-install-dir \
86 -D CMAKE_BUILD_TYPE=Release \
87 -D LibreSSL_DIR=$GITHUB_WORKSPACE/../local/lib/cmake/LibreSSL
88 - name: Consume from the install directory (LibreSSL_DIR) - Build
89 run: cmake --build consumer-install-dir --config Release --verbose