Linux #79
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: Linux | |
on: | |
push: | |
branches: [ master, '*-ci' ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
build_linux: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: ["ubuntu-20.04", "ubuntu-22.04"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Conan v2 | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install conan>=2.0 | |
conan profile detect | |
- name: Build Zserio C++ tutorial | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release | |
cmake --build . | |
- name: Test Zserio C++ tutorial | |
run: | | |
build/ZserioTutorialCpp write_joe | |
build/ZserioTutorialCpp read | |
build/ZserioTutorialCpp write_boss | |
build/ZserioTutorialCpp read | |
- name: Build Zserio C++ tutorial (sources regeneration) | |
run: | | |
cd build | |
rm -rd * | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DREGENERATE_CPP_SOURCES=ON | |
cmake --build . | |
- name: Test Zserio C++ tutorial (sources regeneration) | |
run: | | |
build/ZserioTutorialCpp write_joe | |
build/ZserioTutorialCpp read | |
build/ZserioTutorialCpp write_boss | |
build/ZserioTutorialCpp read | |
- name: Build Zserio C++ tutorial for Conan users | |
run: | | |
conan build ./conan --build=missing --output=build_conan | |
- name: Test Zserio C++ tutorial for Conan users | |
run: | | |
build_conan/ZserioTutorialCpp write_joe | |
build_conan/ZserioTutorialCpp read | |
build_conan/ZserioTutorialCpp write_boss | |
build_conan/ZserioTutorialCpp read | |
- name: Build Zserio C++ custom memory management tutorial | |
run: | | |
mkdir build_pmr | |
cd build_pmr | |
cmake ../pmr -DCMAKE_BUILD_TYPE=Release | |
cmake --build . | |
- name: Test Zserio C++ custom memory management tutorial | |
run: | | |
build_pmr/ZserioTutorialCppPmr write_joe | |
build_pmr/ZserioTutorialCppPmr read | |
build_pmr/ZserioTutorialCppPmr write_boss | |
build_pmr/ZserioTutorialCppPmr read | |
- name: Build Zserio C++ custom memory management tutorial (sources regeneration) | |
run: | | |
cd build_pmr | |
rm -rd * | |
cmake ../pmr -DCMAKE_BUILD_TYPE=Release -DREGENERATE_CPP_SOURCES=ON | |
cmake --build . | |
- name: Test Zserio C++ custom memory management tutorial (sources regeneration) | |
run: | | |
build_pmr/ZserioTutorialCppPmr write_joe | |
build_pmr/ZserioTutorialCppPmr read | |
build_pmr/ZserioTutorialCppPmr write_boss | |
build_pmr/ZserioTutorialCppPmr read | |
- name: Archive Zserio C++ tutorial binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: zserio-tutorial-cpp-${{matrix.os}} | |
path: build/ZserioTutorialCpp |