Tinyopt Builds #304
Workflow file for this run
This file contains hidden or 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: Tinyopt Build & Tests | |
| run-name: Tinyopt Builds | |
| on: [push] | |
| jobs: | |
| ubuntu-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: |- | |
| sudo apt-get install build-essential cmake libeigen3-dev catch2 doxygen | |
| sudo pip3 install -r docs/requirements.txt | |
| # C++20 | |
| - name: Configure Cmake C++20 | |
| run: |- | |
| cmake ./ -B build -DTINYOPT_BUILD_TESTS=ON -DTINYOPT_BUILD_BENCHMARKS=ON \ | |
| -DTINYOPT_BUILD_DOCS=ON -DTINYOPT_BUILD_PACKAGES=ON | |
| - name: Build Tinyopt C++20 | |
| working-directory: build | |
| run: |- | |
| make -j 4 | |
| - name: Install Tinyopt | |
| working-directory: build | |
| run: |- | |
| sudo make install | |
| - name: Run Tests | |
| working-directory: build | |
| run: |- | |
| ctest -V --output-on-failure | |
| - name: Documentation and Packaging | |
| working-directory: build | |
| run: |- | |
| make docs | |
| sudo make deb | |
| sudo dpkg -i *.deb | |
| # C++17 | |
| - name: Configure Cmake C++17 | |
| run: |- | |
| cmake ./ -B build -DCMAKE_CXX_STANDARD=17 -DTINYOPT_BUILD_TESTS=ON -DTINYOPT_BUILD_DOCS=ON -DTINYOPT_BUILD_PACKAGES=ON | |
| - name: Build Tinyopt C++17 | |
| working-directory: build | |
| run: |- | |
| make -j 4 | |
| macos-build: | |
| runs-on: macOS-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: |- | |
| brew install gcc cmake eigen catch2 | |
| - name: Configure Cmake | |
| run: |- | |
| cmake ./ -B build -DCMAKE_BUILD_TYPE=Debug -DTINYOPT_BUILD_TESTS=ON -DTINYOPT_BUILD_DOCS=OFF | |
| - name: Build Tinyopt | |
| working-directory: build | |
| run: |- | |
| cmake --build . --config Debug | |
| - name: Run Tests | |
| working-directory: build | |
| run: |- | |
| ctest -V --output-on-failure | |
| windows-build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Install Packages | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| cd vcpkg | |
| bootstrap-vcpkg.sh | |
| vcpkg integrate install | |
| cd .. | |
| - name: Install Catch2 | |
| run: | | |
| git clone https://github.com/catchorg/Catch2.git | |
| cd Catch2 | |
| cmake -B build -S. -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build/ --config Release --target install | |
| - name: Configure | |
| run: | | |
| cmake -S . -B build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DTINYOPT_BUILD_TESTS=ON -DTINYOPT_BUILD_DOCS=OFF | |
| - name: Build Tinyopt | |
| working-directory: build | |
| run: |- | |
| cmake --build . --config Release | |
| - name: Run Tests | |
| working-directory: build | |
| continue-on-error: false | |
| run: | | |
| ctest -C Release -L Tinyopt -LE Official -LE Unsupported -V --output-on-failure |