Testing for multiplatform #1
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
| #Testing | |
| name: CMake Multi-Platform | |
| on: | |
| push: | |
| branches: [ ghrotenPr167 ] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, macos-14] | |
| compiler: [clang] | |
| env: | |
| ICU_VERSION: "77_1" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| lfs: true | |
| - name: Set up Git LFS | |
| run: | | |
| git lfs install | |
| git lfs pull | |
| - name: Set up ICU on Ubuntu | |
| if: runner.os == 'Linux' | |
| run: | | |
| mkdir -p $HOME/icu | |
| cd $HOME/icu | |
| wget https://github.com/unicode-org/icu/releases/download/release-${ICU_VERSION//_/-}/icu4c-${ICU_VERSION}-Ubuntu22.04-x64.tgz | |
| tar -xzf icu4c-${ICU_VERSION}-Ubuntu22.04-x64.tgz | |
| echo "ICU_ROOT=$HOME/icu" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=$HOME/icu/lib" >> $GITHUB_ENV | |
| - name: Set up ICU on macOS | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install icu4c@77 | |
| echo "ICU_ROOT=$(brew --prefix icu4c@77)" >> $GITHUB_ENV | |
| echo "DYLD_LIBRARY_PATH=$(brew --prefix icu4c@77)/lib" >> $GITHUB_ENV | |
| - name: Create Build Directory | |
| run: mkdir build | |
| - name: Configure CMake | |
| working-directory: build | |
| run: | | |
| cmake .. -DCMAKE_BUILD_TYPE=Release -DICU_ROOT=${{ env.ICU_ROOT }} | |
| - name: Build | |
| working-directory: build | |
| run: cmake --build . --config Release --parallel | |
| - name: Run Tests | |
| working-directory: build | |
| run: ctest --output-on-failure | |