set N threshold to avoid BIG-N Combination problem #53
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: Build BaseVar | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| release: | |
| types: [created] | |
| jobs: | |
| build: | |
| name: Build on ${{matrix.os}} | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| artifact_name: basevar-linux | |
| - os: macos-latest | |
| artifact_name: basevar-macos | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Install Dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake autoconf automake libgtest-dev \ | |
| zlib1g-dev libbz2-dev liblzma-dev libcurl4-openssl-dev libssl-dev | |
| - name: Install Dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install autoconf automake zlib bzip2 xz curl googletest openssl@3 | |
| - name: Configure CMake | |
| run: | | |
| cmake -B ${{github.workspace}}/build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config Release | |
| - name: Test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest -C Release --output-on-failure | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p dist | |
| cp bin/basevar dist/${{matrix.artifact_name}} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{matrix.artifact_name}} | |
| path: dist/${{matrix.artifact_name}} | |
| - name: Upload Release Assets | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/${{matrix.artifact_name}} | |
| - name: Show artifact location | |
| run: | | |
| echo "Build artifacts have been uploaded to:" | |
| echo "- Actions tab: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" | |
| if [["${{github.event_name}}" == "release"]]; then | |
| echo "- Release page: ${{github.server_url}}/${{github.repository}}/releases/latest" | |
| fi |