Run CI on Ubuntu 20.04 #54
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: Prebuild | |
on: | |
push: | |
branches: [ prebuild ] | |
jobs: | |
prebuild: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-11, ubuntu-20.04, windows-2022] | |
steps: | |
- if: matrix.os == 'windows-2022' | |
name: Configure MSVC (Windows) | |
uses: ilammy/msvc-dev-cmd@v1 | |
- if: matrix.os == 'macos-11' | |
name: Configure Xcode (MacOS) | |
run: | | |
sudo xcode-select -s /Applications/Xcode_12.4.app/Contents/Developer | |
- name: Install Meson and Ninja | |
run: | | |
pip3 install --upgrade meson ninja | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- if: matrix.os == 'macos-11' | |
name: Build - Release (MacOS) | |
run: | | |
bash openssl/build-universal.sh | |
mkdir -p builddir | |
cd builddir | |
cp -r ../openssl/subprojects/openssl-3.0.2/generated-config/archs/darwin64-arm64-cc/asm/include ../openssl/subprojects/openssl-3.0.2 | |
cp -r ../openssl/subprojects/openssl-3.0.2/generated-config/archs/darwin64-x86_64-cc/asm/include ../openssl/subprojects/openssl-3.0.2 | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" | |
cmake --build . --config Release -- -j8 | |
cmake --build . --target install | |
python3 ../scripts/bundle.py mac release done | |
- if: matrix.os == 'ubuntu-20.04' | |
name: Build - Release (Linux) | |
run: | | |
cd openssl | |
meson setup builddir --buildtype=release | |
meson compile -C builddir | |
cd .. | |
mkdir -p builddir | |
cd builddir | |
cp -r ../openssl/subprojects/openssl-3.0.2/generated-config/archs/linux-x86_64/asm/include ../openssl/subprojects/openssl-3.0.2 | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF | |
cmake --build . --config Release -- -j8 | |
cmake --build . --target install | |
python3 ../scripts/bundle.py linux release done | |
- if: matrix.os == 'windows-2022' | |
name: Build - Release /MT (Windows) | |
run: | | |
cd openssl | |
meson setup builddir --buildtype=release -Dmt=enabled | |
meson compile -C builddir | |
cd .. | |
mkdir -force builddir | |
cd builddir | |
cp -r -force ../openssl/subprojects/openssl-3.0.2/generated-config/archs/VC-WIN64A/no-asm/include ../openssl/subprojects/openssl-3.0.2 | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF -DPOCO_MT=ON -DCMAKE_CXX_FLAGS="-DPOCO_NO_AUTOMATIC_LIBS -DPOCO_STATIC" | |
cmake --build . --config Release | |
cmake --build . --target install | |
python3 ../scripts/bundle.py win release_mt | |
- if: matrix.os == 'windows-2022' | |
name: Build - Release /MD (Windows) | |
run: | | |
rm -r builddir | |
rm -r openssl/builddir | |
cd openssl | |
meson setup builddir --buildtype=release -Dmt=disabled | |
meson compile -C builddir | |
cd .. | |
mkdir -force builddir | |
cd builddir | |
cp -r -force ../openssl/subprojects/openssl-3.0.2/generated-config/archs/VC-WIN64A/no-asm/include ../openssl/subprojects/openssl-3.0.2 | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF -DPOCO_MT=OFF -DCMAKE_CXX_FLAGS="-DPOCO_NO_AUTOMATIC_LIBS -DPOCO_STATIC" | |
cmake --build . --config Release | |
cmake --build . --target install | |
python3 ../scripts/bundle.py win release_md done | |
- name: Upload | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
replacesArtifacts: true | |
tag: build-${{ github.run_number }} | |
name: Build ${{ github.run_number }} | |
artifacts: scripts/poco-*.zip | |
artifactContentType: application/zip | |
commit: ${{ github.sha }} |