Test #1560
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: Build | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'rr/**' # "rr" stands for "remote run" | |
| pull_request: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: '0 0 * * *' # every day at 00:00 | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
| # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md | |
| # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md | |
| # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md | |
| # | |
| # Xcode version comparison: https://en.wikipedia.org/wiki/Xcode | |
| os: [macos-13, macos-14, macos-15] | |
| name: Build | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: .deps | |
| key: ${{ matrix.os }}-${{ runner.arch }}-${{ hashFiles('script/install-dep.sh', 'Gemfile', '.bundle/config') }} | |
| - uses: nikitabobko/setup-swift@21e0b6448e6aa76937c51d4b172f6cba5e537cde # todo migrate to swiftly | |
| with: | |
| swift-version: '6.1.0' | |
| - run: | | |
| if sw_vers -productVersion | grep -q "^13"; then # macOS 13 | |
| true | |
| else | |
| sudo xcode-select -s "$XCODE_16_DEVELOPER_DIR" # Affects macOS SDK | |
| fi | |
| - run: brew install bash fish xcbeautify | |
| - run: env # Debug | |
| - run: ./script/install-dep.sh --all | |
| - run: ./build-debug.sh | |
| - run: ./run-tests.sh | |
| # "-" means "Sign to run locally". There is no aerospace-codesign-certificate in GH Actions | |
| # build-release.sh takes too much time to complete in macos-13. | |
| # Running build-release.sh only in macos-15, cuts the build time twice in GH Actions. | |
| - name: ./build-release.sh on macos-15 | |
| run: | | |
| sw_vers -productVersion | |
| if sw_vers -productVersion | grep -q "^15"; then | |
| ./build-release.sh --codesign-identity - | |
| ./install-from-sources.sh --dont-rebuild | |
| fi |