simplify and improve buffer checks #251
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: ci_macos | |
| on: | |
| push: | |
| paths: | |
| - "**.c" | |
| - "**.h" | |
| - "**.cpp" | |
| - "**.f90" | |
| - "**.F90" | |
| - "**/CMakeLists.txt" | |
| - "**.cmake" | |
| - ".github/workflows/ci_macos.yml" | |
| workflow_dispatch: | |
| # avoid wasted runs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| mac: | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [ {cpp: clang++, c: clang, fc: flang-new }, | |
| {cpp: g++-15, c: gcc-15, fc: gfortran-15 } ] | |
| env: | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| CC: ${{ matrix.compiler.c }} | |
| CXX: ${{ matrix.compiler.cpp }} | |
| FC: ${{ matrix.compiler.fc }} | |
| steps: | |
| - name: install Flang | |
| if: ${{ matrix.compiler.fc == 'flang-new' }} | |
| run: brew install flang | |
| # - name: Latest Xcode needed for GCC | |
| # if: startsWith(matrix.compiler.cpp, 'g++') | |
| # run: sudo xcode-select --switch /Library/Developer/CommandLineTools | |
| # This comes into play when GA is pinned to an old Xcode b/c Homebrew builds against latest | |
| # Every say year or two this becomes an issue. | |
| # https://github.com/Homebrew/homebrew-core/issues/228131 | |
| - &checkout | |
| uses: actions/checkout@v7 | |
| - uses: ./.github/workflows/composite-build | |
| - name: C++23 workflow | |
| run: cmake --workflow cpp23 | |
| - name: ISO_Fortran_binding.h workflow | |
| run: cmake --workflow isofortran | |
| shared: | |
| runs-on: macos-latest | |
| timeout-minutes: 5 | |
| env: | |
| FC: gfortran-15 | |
| steps: | |
| - *checkout | |
| - name: build and test | |
| run: cmake --workflow shared | |
| - name: install package | |
| run: cmake --install build-shared | |
| - name: example | |
| working-directory: example | |
| run: cmake --workflow shared |