support ChangeStream #10
Workflow file for this run
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: build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
linux: | |
runs-on: ubuntu-22.04 | |
name: Amazon Linux 2023 | |
strategy: | |
matrix: | |
image: | |
- tayloraswift/5.10.0-amazonlinux2023:latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up mock deployments | |
run: | | |
docker compose -f .github/mongonet/docker-compose.yml up -d | |
- name: Initialize replica set | |
run: | | |
timeout 60s bash -c \ | |
'until docker exec -t mongonet-mongo-0-1 /bin/mongosh --file /create-replica-set.js; do sleep 1; done' | |
- name: Run pipeline | |
run: | | |
docker run -t --rm --network=mongonet \ | |
--name mongonet-environment \ | |
--user root \ | |
-v $PWD:/swift-mongodb \ | |
-w /swift-mongodb \ | |
${{ matrix.image }} \ | |
/bin/bash $(echo .github/pipeline) | |
macos: | |
runs-on: macos-14 | |
name: macOS | |
strategy: | |
matrix: | |
swift: | |
- toolchain: 5.10-RELEASE | |
branch: swift-5.10-release | |
env: | |
SWIFT_TOOLCHAIN_DIRECTORY: >- | |
/Library/Developer/Toolchains/swift-${{ matrix.swift.toolchain }}.xctoolchain | |
steps: | |
- name: Cache swift toolchains | |
uses: actions/cache@v2 | |
with: | |
path: swift-${{ matrix.swift.toolchain }}.pkg | |
key: macos:swift:${{ matrix.swift.toolchain }} | |
- name: Cache status | |
id: cache_status | |
uses: andstor/file-existence-action@v1 | |
with: | |
files: swift-${{ matrix.swift.toolchain }}.pkg | |
- name: Download toolchain | |
if: steps.cache_status.outputs.files_exists == 'false' | |
run: "curl https://download.swift.org/\ | |
${{ matrix.swift.branch }}/xcode/\ | |
swift-${{ matrix.swift.toolchain }}/\ | |
swift-${{ matrix.swift.toolchain }}-osx.pkg \ | |
--output swift-${{ matrix.swift.toolchain }}.pkg" | |
- name: Install toolchain | |
run: | | |
sudo installer -pkg swift-${{ matrix.swift.toolchain }}.pkg -target / | |
- name: Select toolchain | |
run: | | |
echo "TOOLCHAINS=$(plutil -extract CFBundleIdentifier raw \ | |
$SWIFT_TOOLCHAIN_DIRECTORY/Info.plist)" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Build only | |
run: | | |
swift --version | |
swift build |