[CI] Add Swift 5.9 CI jobs (#403) #198
This file contains 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: CMake | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '.github/workflows/cmake.yml' | |
- '**/CMakeLists.txt' | |
- '**/*.cmake' | |
- '**/*.cmake.in' | |
- 'Sources/**/*.[ch]' | |
- 'Sources/**/*.swift' | |
- 'Sources/**/module.modulemap' | |
pull_request: | |
paths: | |
- '.github/workflows/cmake.yml' | |
- '**/CMakeLists.txt' | |
- '**/*.cmake' | |
- '**/*.cmake.in' | |
- 'Sources/**/*.[ch]' | |
- 'Sources/**/*.swift' | |
- 'Sources/**/module.modulemap' | |
jobs: | |
CMake: | |
strategy: | |
matrix: | |
xcode_version: ['14.2', '14.3', '15.0'] | |
runs-on: macos-13 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app | |
steps: | |
- uses: actions/checkout@v3 | |
- run: brew install cmake ninja | |
- run: swift -version | |
- run: rm -rf build | |
- run: cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE=Release | |
- run: cmake --build build | |
- run: cmake --build build --target install | |
- run: file /usr/local/lib/swift/macosx/libYams.dylib | grep "Mach-O 64-bit dynamically linked shared library x86_64" | |
CMake_Linux: | |
strategy: | |
matrix: | |
tag: ['5.6', '5.7', '5.8', '5.9'] | |
runs-on: ubuntu-latest | |
container: | |
image: swift:${{ matrix.tag }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: apt-get update && apt-get install -y ninja-build curl | |
- run: curl -L https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-x86_64.tar.gz | tar xz --strip-components=1 -C /usr | |
- run: swift -version | |
- run: rm -rf build | |
- run: cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE=Release | |
- run: cmake --build build | |
- run: cmake --build build --target install |