docs: finalize 0.37.1 changelog #5269
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| SWIFT_VERSION: 6.2.1 | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| macos-tests: ${{ steps.macos-tests.outputs.macos-tests }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect macOS test impact | |
| id: macos-tests | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| base_sha="${{ github.event.pull_request.base.sha }}" | |
| else | |
| base_sha="${{ github.event.before }}" | |
| fi | |
| changed_paths="${RUNNER_TEMP}/changed-paths.txt" | |
| if [[ -z "$base_sha" || "$base_sha" =~ ^0+$ ]]; then | |
| git ls-files | awk '{ print "A\t" $0 }' > "$changed_paths" | |
| elif ! git cat-file -e "${base_sha}^{commit}" 2>/dev/null; then | |
| echo "Base commit ${base_sha} is unavailable; running macOS tests conservatively." | |
| git ls-files | awk '{ print "A\t" $0 }' > "$changed_paths" | |
| else | |
| git diff --name-status "$base_sha" "$GITHUB_SHA" > "$changed_paths" | |
| fi | |
| printf 'Changed paths:\n' | |
| sed 's/^/- /' "$changed_paths" | |
| ./Scripts/ci_macos_test_gate.sh "$changed_paths" | |
| lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install lint tools | |
| run: ./Scripts/install_lint_tools.sh swiftlint | |
| - name: Lint | |
| run: ./Scripts/lint.sh lint-linux | |
| swift-test-macos: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.macos-tests == 'true' }} | |
| runs-on: macos-15-intel | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard-index: [0, 1, 2, 3] | |
| shard-count: [4] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Select Xcode 26.1.1 (if present) or fallback to default | |
| run: | | |
| set -euo pipefail | |
| for candidate in /Applications/Xcode_26.1.1.app /Applications/Xcode_26.1.app /Applications/Xcode.app; do | |
| if [[ -d "$candidate" ]]; then | |
| sudo xcode-select -s "${candidate}/Contents/Developer" | |
| echo "DEVELOPER_DIR=${candidate}/Contents/Developer" >> "$GITHUB_ENV" | |
| break | |
| fi | |
| done | |
| /usr/bin/xcodebuild -version | |
| - name: Swift toolchain version | |
| run: | | |
| set -euo pipefail | |
| swift --version | |
| swift package --version | |
| - name: Check app locales and Swift formatting | |
| if: ${{ matrix.shard-index == 0 }} | |
| run: ./Scripts/lint.sh lint-macos | |
| - name: Swift Test | |
| timeout-minutes: 35 | |
| run: | | |
| CODEXBAR_TEST_GROUP_SIZE=1 \ | |
| CODEXBAR_TEST_SUITE_TIMEOUT=120 \ | |
| CODEXBAR_TEST_SHARD_INDEX=${{ matrix.shard-index }} \ | |
| CODEXBAR_TEST_SHARD_COUNT=${{ matrix.shard-count }} \ | |
| ./Scripts/test.sh | |
| lint-build-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| needs: | |
| - changes | |
| - lint | |
| - swift-test-macos | |
| if: ${{ always() && !cancelled() }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Verify lint and macOS test jobs | |
| run: | | |
| ./Scripts/ci_verify_test_jobs.sh \ | |
| "${{ needs.lint.result }}" \ | |
| "${{ needs.changes.result }}" \ | |
| "${{ needs.changes.outputs.macos-tests }}" \ | |
| "${{ needs.swift-test-macos.result }}" | |
| build-linux-cli: | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: linux-x64 | |
| runs-on: ubuntu-24.04 | |
| - name: linux-arm64 | |
| runs-on: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Runner info | |
| run: | | |
| set -euo pipefail | |
| uname -a | |
| uname -m | |
| - name: Restore Swift toolchain cache | |
| id: swift-toolchain-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local/share/swiftly | |
| key: swift-${{ runner.os }}-${{ runner.arch }}-${{ env.SWIFT_VERSION }}-v2 | |
| - name: Install Swift ${{ env.SWIFT_VERSION }} via swiftly | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| missing_packages=() | |
| for package in ca-certificates gpg libcurl4-openssl-dev; do | |
| if ! dpkg-query -W -f='${Status}' "$package" 2>/dev/null | grep -q "install ok installed"; then | |
| missing_packages+=("$package") | |
| fi | |
| done | |
| if [[ "${#missing_packages[@]}" -gt 0 ]]; then | |
| sudo apt-get update | |
| sudo apt-get install -y "${missing_packages[@]}" | |
| fi | |
| SWIFTLY_ARCH="$(uname -m)" | |
| SWIFTLY_HOME_DIR="$HOME/.local/share/swiftly" | |
| SWIFTLY_BIN_DIR="$HOME/.local/bin" | |
| POST_INSTALL_SCRIPT="$(mktemp)" | |
| mkdir -p "$SWIFTLY_BIN_DIR" | |
| echo "Swift toolchain cache hit: ${{ steps.swift-toolchain-cache.outputs.cache-hit }}" | |
| curl -fsSL "https://download.swift.org/swiftly/linux/swiftly-${SWIFTLY_ARCH}.tar.gz" -o /tmp/swiftly.tar.gz | |
| tar -xzf /tmp/swiftly.tar.gz -C /tmp | |
| /tmp/swiftly init --assume-yes --skip-install | |
| . "$SWIFTLY_HOME_DIR/env.sh" | |
| echo "$SWIFTLY_BIN_DIR" >> "$GITHUB_PATH" | |
| echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> "$GITHUB_ENV" | |
| echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> "$GITHUB_ENV" | |
| swiftly install "$SWIFT_VERSION" --use --assume-yes --post-install-file "$POST_INSTALL_SCRIPT" | |
| if [[ -s "$POST_INSTALL_SCRIPT" ]]; then | |
| sudo apt-get update | |
| sudo bash "$POST_INSTALL_SCRIPT" | |
| fi | |
| hash -r | |
| swift --version | |
| - name: Build CodexBarCLI (release, static Swift stdlib) | |
| run: swift build -c release --product CodexBarCLI --static-swift-stdlib | |
| - name: Swift Test (Linux only) | |
| run: swift test --parallel | |
| - name: Smoke test CodexBarCLI | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| BIN_DIR="$(swift build -c release --product CodexBarCLI --static-swift-stdlib --show-bin-path)" | |
| BIN="$BIN_DIR/CodexBarCLI" | |
| "$BIN" --help >/dev/null | |
| "$BIN" --version >/dev/null | |
| if "$BIN" usage --provider codex --web >/dev/null 2>&1; then | |
| echo "Expected --web to fail on Linux" | |
| exit 1 | |
| fi | |
| "$BIN" usage --provider codex --web 2>&1 | tee /tmp/codexbarcli-stderr.txt >/dev/null || true | |
| grep -q "macOS" /tmp/codexbarcli-stderr.txt |