improve building #14
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: MacOS ParseArgs CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.cfg.os }} | |
| name: ${{ matrix.cfg.os }}@${{ matrix.cfg.cxx }}-${{ matrix.cfg.cpp-version }} | |
| strategy: | |
| matrix: | |
| cfg: | |
| - {os: macOS-11, cc: xcode, cxx: xcode, cpp-version: 11.7, generator: Ninja} | |
| - {os: macOS-11, cc: xcode, cxx: xcode, cpp-version: 12.4, generator: Ninja} | |
| - {os: macOS-11, cc: xcode, cxx: xcode, cpp-version: 12.5.1, generator: Ninja} | |
| #- {os: macOS-11, cc: xcode, cxx: xcode, cpp-version: 13.0, generator: Ninja} | |
| - {os: macOS-11, cc: xcode, cxx: xcode, cpp-version: 13.1, generator: Ninja} | |
| - {os: macOS-11, cc: xcode, cxx: xcode, cpp-version: 13.2.1, generator: Ninja} | |
| - {os: macOS-12, cc: xcode, cxx: xcode, cpp-version: 13.1, generator: Ninja} | |
| - {os: macOS-12, cc: xcode, cxx: xcode, cpp-version: 13.2.1, generator: Ninja} | |
| - {os: macOS-12, cc: xcode, cxx: xcode, cpp-version: 13.3.1, generator: Ninja} | |
| - {os: macOS-12, cc: xcode, cxx: xcode, cpp-version: 13.4, generator: Ninja} | |
| - {os: macOS-12, cc: xcode, cxx: xcode, cpp-version: 13.4.1, generator: Ninja} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v1 | |
| with: | |
| submodules: recursive | |
| - name: Get latest CMake | |
| uses: lukka/get-cmake@latest | |
| - name: Install compiler and dependencies | |
| run: | | |
| curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install | |
| if [ "${{ matrix.cfg.cc }}" = "gcc" ]; then | |
| brew install gcc@${{ matrix.cfg.cpp-version }} | |
| echo "CC=gcc-${{ matrix.cfg.cpp-version }}" >> $GITHUB_ENV | |
| echo "CXX=g++-${{ matrix.cfg.cpp-version }}" >> $GITHUB_ENV | |
| else | |
| sudo xcode-select -switch /Applications/Xcode_${{ matrix.cfg.cpp-version }}.app | |
| echo "CC=clang" >> $GITHUB_ENV | |
| echo "CXX=clang++" >> $GITHUB_ENV | |
| fi | |
| - name: Build with CMake | |
| uses: lukka/run-cmake@v3 | |
| with: | |
| cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
| cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
| useVcpkgToolchainFile: false | |
| buildDirectory: '${{ runner.workspace }}/buildDirectory' | |
| cmakeAppendedArgs: "-G\"${{ matrix.cfg.generator }}\" -DCMAKE_BUILD_TYPE:STRING=Release" | |
| cmakeBuildType: 'Release' | |
| buildWithCMakeArgs: '--config Release --target install' |