diff options
| author | Theo Buehler <tb@openbsd.org> | 2025-01-11 13:36:30 +0100 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2025-01-11 13:36:30 +0100 |
| commit | 2c8bc600e75857a76eaddea9ad3341914d25078c (patch) | |
| tree | a44a095456870eb7ea220c1b646e6cb895169a1e | |
| parent | 0d8a436dbea57a40a8aea9b027cb696aa9322e1c (diff) | |
| parent | b8e4965e549c0c081c99ad6498174b0064c24448 (diff) | |
| download | portable-2c8bc600e75857a76eaddea9ad3341914d25078c.tar.gz portable-2c8bc600e75857a76eaddea9ad3341914d25078c.tar.bz2 portable-2c8bc600e75857a76eaddea9ad3341914d25078c.zip | |
Land 1135 - CI: improve cmake config workflow
| -rw-r--r-- | .github/workflows/cmake-config.yml | 98 | ||||
| -rw-r--r-- | .github/workflows/cmake_config.yml | 89 | ||||
| -rw-r--r-- | .gitignore | 1 |
3 files changed, 99 insertions, 89 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 | ||
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 @@ | |||
| 1 | name: cmake_config | ||
| 2 | |||
| 3 | on: [push, pull_request] | ||
| 4 | |||
| 5 | concurrency: | ||
| 6 | group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | ||
| 7 | cancel-in-progress: true | ||
| 8 | |||
| 9 | jobs: | ||
| 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 | ||
| @@ -39,6 +39,7 @@ Makefile.in | |||
| 39 | 39 | ||
| 40 | # CMake stuff | 40 | # CMake stuff |
| 41 | build | 41 | build |
| 42 | cmake-build-debug/ | ||
| 42 | 43 | ||
| 43 | # Libtool stuff | 44 | # Libtool stuff |
| 44 | .libs | 45 | .libs |
