Merge branch 'main' of github.com:alexey1312/ExFig #106
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: | |
| branches: ["main"] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Setup mise environment | |
| run: source Scripts/environment.sh | |
| shell: bash | |
| - name: Check formatting (Swift + Markdown) | |
| run: bin/mise run format-check | |
| - name: Lint (SwiftLint) | |
| run: bin/mise run lint | |
| build-macos: | |
| name: Build & Test (macOS) | |
| runs-on: macos-15 | |
| needs: lint | |
| env: | |
| DEVELOPER_DIR: "/Applications/Xcode_26.1.1.app/Contents/Developer" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Cache SPM dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift', 'Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Setup mise environment | |
| run: source Scripts/environment.sh | |
| shell: bash | |
| - name: Show Swift version | |
| run: swift --version | |
| - name: Build | |
| run: swift build 2>&1 | xcsift | |
| - name: Test | |
| run: swift test --enable-code-coverage 2>&1 | xcsift | |
| - name: Generate coverage report | |
| if: github.ref == 'refs/heads/main' | |
| continue-on-error: true | |
| run: ./Scripts/coverage.sh | |
| build-linux: | |
| name: Build & Test (Linux) | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| container: | |
| image: swift:6.2 | |
| steps: | |
| - name: Install Git LFS | |
| run: | | |
| apt-get update | |
| apt-get install -y git-lfs | |
| git lfs install | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Cache SPM dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift', 'Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Show Swift version | |
| run: swift --version | |
| - name: Build | |
| run: swift build | |
| - name: Run tests | |
| # Use --num-workers 1 to avoid memory corruption with libpng on Linux | |
| run: swift test --parallel --num-workers 1 |