disable macOS 11 build #182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: [push] | |
env: | |
FS_OPENSSL_VERSION_STR: "1.0.2u" | |
jobs: | |
build-ubuntu: | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: [ "20.04", "22.04" ] | |
asm: [ "YES", "NO" ] | |
zlib: [ "YES", "NO" ] | |
threads: [ "YES", "NO" ] | |
continue-on-error: true | |
runs-on: ubuntu-${{ matrix.runner }} | |
name: "build-ubuntu-${{ matrix.runner }} (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}), Threads: ${{ matrix.threads }}" | |
env: | |
FS_OPENSSL_PACKAGE_STR: Ubuntu${{ matrix.runner }}-x86_64-ASM${{ matrix.asm }}-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: openssl-externalCMake | |
- name: add CMake repository and needed softwares | |
run: | | |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | |
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ '"$(. /etc/os-release; echo ${VERSION_CODENAME})"' main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null | |
sudo apt-get update | |
sudo apt-get install cmake ninja-build perl build-essential zlib1g-dev | |
- name: run CMake + Ninja | |
run: | | |
mkdir -p "build" | |
cd "build" | |
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" -DOPENSSL_ASM=${{ matrix.asm }} -DOPENSSL_ZLIB=${{ matrix.zlib }} -DOPENSSL_THREADS=${{ matrix.threads }} "${{ github.workspace }}/openssl-externalCMake" | |
ninja | |
cmake --install . --strip | |
# - name: run test | |
# run: | | |
# cd "build" | |
# ninja check | |
- name: package | |
run: | | |
tar -cJf "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz" "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }} | |
path: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz | |
build-macOS: | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: [ "12", "13" ] | |
asm: [ "YES", "NO" ] | |
zlib: [ "YES", "NO" ] | |
threads: [ "YES", "NO" ] | |
continue-on-error: true | |
runs-on: macos-${{ matrix.runner }} | |
name: "build-macOS${{ matrix.runner }}-x86_64 (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}, Threads: ${{ matrix.threads }}" | |
env: | |
FS_OPENSSL_PACKAGE_STR: macOS${{ matrix.runner }}-x86_64-ASM${{ matrix.asm }}-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: openssl-externalCMake | |
- name: install cmake and ninja | |
run: | | |
while ! brew update; do :; done | |
brew install cmake ninja | |
- name: run CMake + Ninja | |
run: | | |
mkdir -p "build" | |
cd "build" | |
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DOPENSSL_ASM=${{ matrix.asm }} -DOPENSSL_ZLIB=${{ matrix.zlib }} -DOPENSSL_THREADS=${{ matrix.threads }} "${{ github.workspace }}/openssl-externalCMake" | |
ninja | |
cmake --install . --strip | |
# - name: run test | |
# run: | | |
# cd "build" | |
# ninja check | |
- name: package | |
run: | | |
tar -cJf "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz" "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }} | |
path: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz | |
build-macOS-aarch64: | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: [ "12", "13" ] | |
asm: [ "NO" ] # macOS on ARM is not officially supported as of 1.0.2. ASM can't be build due to no available perlasm scheme. | |
zlib: [ "YES", "NO" ] | |
threads: [ "YES", "NO" ] | |
continue-on-error: true | |
runs-on: macos-${{ matrix.runner }} | |
name: "build-macOS${{ matrix.runner }}-aarch64 (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}, Threads: ${{ matrix.threads }}" | |
env: | |
FS_OPENSSL_PACKAGE_STR: macOS${{ matrix.runner }}-aarch64-ASM${{ matrix.asm }}-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: openssl-externalCMake | |
- name: install cmake and ninja | |
run: | | |
while ! brew update; do :; done | |
brew install cmake ninja | |
- name: run CMake + Ninja | |
run: | | |
mkdir -p "build" | |
cd "build" | |
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" -DCMAKE_OSX_ARCHITECTURES="arm64" -DOPENSSL_ASM=${{ matrix.asm }} -DOPENSSL_ZLIB=${{ matrix.zlib }} -DOPENSSL_THREADS=${{ matrix.threads }} "${{ github.workspace }}/openssl-externalCMake" | |
ninja | |
cmake --install . --strip | |
# Tests can not run. GitHub actions runs on x86_64 and there is no Rosetta2 available. Also test fails on macOS on ARM and won't be fixed since it is not supported anymore even using original perl-based Configure. | |
- name: package | |
run: | | |
tar -cJf "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz" "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }} | |
path: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz | |
build-macOS-unified: | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: [ "12", "13" ] | |
# can't build ASM on unified. Also macOS on ARM is not officially supported as of 1.0.2 | |
zlib: [ "YES", "NO" ] | |
threads: [ "YES", "NO" ] | |
continue-on-error: true | |
runs-on: macos-${{ matrix.runner }} | |
name: "build-macOS${{ matrix.runner }}-unified (Zlib: ${{ matrix.zlib }}, Threads: ${{ matrix.threads }}" | |
env: | |
FS_OPENSSL_PACKAGE_STR: macOS${{ matrix.runner }}-unified-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: openssl-externalCMake | |
- name: install cmake and ninja | |
run: | | |
while ! brew update; do :; done | |
brew install cmake ninja | |
- name: run CMake + Ninja | |
run: | | |
mkdir -p "build" | |
cd "build" | |
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DOPENSSL_ASM=NO -DOPENSSL_ZLIB=${{ matrix.zlib }} -DOPENSSL_THREADS=${{ matrix.threads }} "${{ github.workspace }}/openssl-externalCMake" | |
ninja | |
cmake --install . --strip | |
# Tests need not run. Same as no-asm x86_64 since GitHub actions runs on x86_64 and there is no Rosetta2 available | |
- name: package | |
run: | | |
tar -cJf "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz" "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }} | |
path: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz | |
build-MinGW: | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- version: "12.2.0" | |
bit: "64" | |
arch: "x86_64" | |
url: "https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/x86_64-12.2.0-release-posix-seh-msvcrt-rt_v10-rev2.7z" | |
- version: "12.2.0" | |
bit: "32" | |
arch: "i686" | |
url: "https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/i686-12.2.0-release-posix-dwarf-msvcrt-rt_v10-rev2.7z" | |
- version: "13.1.0" | |
bit: "64" | |
arch: "x86_64" | |
url: "https://github.com/niXman/mingw-builds-binaries/releases/download/13.1.0-rt_v11-rev1/x86_64-13.1.0-release-posix-seh-msvcrt-rt_v11-rev1.7z" | |
asm: [ "YES", "NO" ] | |
threads: [ "YES", "NO" ] | |
continue-on-error: true | |
runs-on: windows-latest | |
name: "build-MinGW-GCC${{ matrix.toolchain.version }}-${{ matrix.toolchain.bit }}bit (ASM: ${{ matrix.asm }}, Threads: ${{ matrix.threads }}" | |
env: | |
FS_OPENSSL_PACKAGE_STR: MinGWGCC${{ matrix.toolchain.version }}-${{ matrix.toolchain.arch }}-ASM${{ matrix.asm }}-Threads${{ matrix.threads }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: openssl-externalCMake | |
- name: add CMake repository and needed softwares | |
run: | | |
choco install cmake | |
choco install ninja | |
- name: install MinGW toolchain | |
run: | | |
New-Item -Path "." -Name "mingw" -ItemType "directory"; | |
(New-Object System.Net.WebClient).DownloadFile("${{ matrix.toolchain.url }}","mingw/mingw.7z"); | |
cmd /c cd mingw "&&" 7z x mingw.7z | |
- name: run CMake + Ninja | |
shell: cmd | |
run: | | |
del /s /q C:\Strawberry\perl\bin\pkg-config.bat | |
set path=${{ github.workspace }}\mingw\mingw${{ matrix.toolchain.bit }}\\bin;%path% | |
mkdir -p "build" | |
cd "build" | |
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" -DOPENSSL_ASM=${{ matrix.asm }} -DOPENSSL_THREADS=${{ matrix.threads }} -DPOD2MAN="C:\Strawberry\perl\bin\pod2man.bat" "${{ github.workspace }}/openssl-externalCMake" | |
ninja | |
cmake --install . --strip | |
# - name: run test | |
# shell: cmd | |
# run: | | |
# set path=${{ github.workspace }}\mingw\mingw${{ matrix.toolchain.bit }}\\bin;%path% | |
# cd "build" | |
# ninja check | |
- name: package | |
run: | | |
7z a "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.7z" "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }} | |
path: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.7z | |
build-msvc: | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- version: "2022" | |
runson: "2022" | |
call: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat | |
bit: "64" | |
arch: "x86_64" | |
- version: "2019" | |
runson: "2019" | |
call: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat | |
bit: "64" | |
arch: "x86_64" | |
- version: "2019" | |
runson: "2019" | |
call: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat | |
bit: "32" | |
arch: "i686" | |
asm: | |
- value: "NO" | |
nasm: "NO" | |
- value: "YES" | |
nasm: "NO" | |
- value: "YES" | |
nasm: "YES" | |
# msvc builds doesn't support no-thread | |
continue-on-error: true | |
runs-on: windows-${{ matrix.toolchain.runson }} | |
name: "build-MSVC${{ matrix.toolchain.version }}-${{ matrix.toolchain.bit }}bit (ASM: ${{ matrix.asm.value }}, NASM: ${{ matrix.asm.nasm }})" | |
env: | |
FS_OPENSSL_PACKAGE_STR: MSVC${{ matrix.toolchain.version }}-${{ matrix.toolchain.arch }}-ASM${{ matrix.asm.value }}-NASM${{ matrix.asm.nasm }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: openssl-externalCMake | |
- name: add CMake repository and needed softwares | |
run: | | |
choco install cmake | |
choco install ninja | |
choco install nasm | |
- name: run CMake + Ninja | |
shell: cmd | |
run: | | |
del /s /q C:\Strawberry\perl\bin\pkg-config.bat | |
call "${{ matrix.toolchain.call }}" | |
mkdir -p "build" | |
cd "build" | |
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" -DOPENSSL_ASM=${{ matrix.asm.value }} -DOPENSSL_NASM=${{ matrix.asm.nasm }} -DPOD2MAN="C:\Strawberry\perl\bin\pod2man.bat" "${{ github.workspace }}/openssl-externalCMake" | |
ninja | |
cmake --install . --strip | |
# - name: run test | |
# shell: cmd | |
# run: | | |
# call "${{ matrix.toolchain.call }}" | |
# cd "build" | |
# ninja check | |
- name: package | |
run: | | |
7z a "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.7z" "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }} | |
path: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.7z | |
# The first NDK version which supports CMake is r13, but since then GCC is no longer supported and is broken (https://github.com/android/ndk/issues/67 is closed as won't fix) | |
# clang on NDK doesn't support the "-mandroid" flag OpenSSL sets. We'd use sed to remove them from command line when using perl-based Configure | |
# TODO: make a CMake toolchain file for known-good NDK r10e (Did I make it in the LibreSSL build project? I'd go search the trash) | |
# use r13b for build testing on GCC. OpenSSL 1.0.2 didn't support Android x86_64 so no build test for it. | |
build-android: | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- arch: "armeabi-v7a" | |
platform: "9" | |
- arch: "x86" | |
platform: "9" | |
- arch: "armeabi-v7a" | |
platform: "16" | |
- arch: "x86" | |
platform: "16" | |
- arch: "armeabi-v7a" | |
platform: "21" | |
- arch: "x86" | |
platform: "21" | |
- arch: "arm64-v8a" | |
platform: "21" | |
asm: [ "YES", "NO" ] | |
threads: [ "YES", "NO" ] | |
zlib: [ "YES", "NO" ] | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
name: "build-AndroidAPI${{ matrix.toolchain.platform }}-${{ matrix.toolchain.arch }} (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}), Threads: ${{ matrix.threads }}" | |
env: | |
FS_OPENSSL_PACKAGE_STR: AndroidAPI${{ matrix.toolchain.platform }}-${{ matrix.toolchain.arch }}}-ASM${{ matrix.asm }}Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: openssl-externalCMake | |
- name: add CMake repository and needed softwares | |
run: | | |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | |
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ '"$(. /etc/os-release; echo ${VERSION_CODENAME})"' main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null | |
sudo apt-get update | |
sudo apt-get install cmake ninja-build perl | |
- name: download Android NDK r13b | |
run: | | |
wget -O ndk.zip https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip | |
unzip ndk.zip | |
- name: run CMake + Ninja | |
# need to unset all Android related stuff before using our own NDK | |
run: | | |
unset ANDROID_HOME ANDROID_NDK ANDROID_NDK_HOME ANDROID_NDK_LATEST_HOME ANDROID_NDK_ROOT ANDROID_SDK_ROOT || : | |
mkdir -p "build" | |
cd "build" | |
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/android-ndk-r13b/build/cmake/android.toolchain.cmake" -DANDROID_ABI=${{ matrix.toolchain.arch }} -DANDROID_PLATFORM=android-${{ matrix.toolchain.platform }} -DANDROID_TOOLCHAIN=gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" -DOPENSSL_ASM=${{ matrix.asm }} -DOPENSSL_ZLIB=${{ matrix.zlib }} -DOPENSSL_THREADS=${{ matrix.threads }} "${{ github.workspace }}/openssl-externalCMake" | |
ninja | |
cmake --install . --strip | |
# test can't be run due to the syntax is not compatible with Android. TODO: android emulator | |
- name: package | |
run: | | |
tar -cJf "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz" "openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }} | |
path: openssl${{ env.FS_OPENSSL_VERSION_STR }}-${{ env.FS_OPENSSL_PACKAGE_STR }}.tar.xz |