fix(ci): temporarily remove cache #335
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: | |
| pull_request: | |
| env: | |
| GHC_VERSION: "9.12.2" | |
| CABAL_VERSION: "3.12" | |
| RUST_STABLE: "stable" | |
| RUST_NIGHTLY: "nightly" | |
| jobs: | |
| svm-build: | |
| name: Build Rust (svm) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # Linux builds | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| cross: false | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| cross: true | |
| # macOS builds | |
| - os: macos-15-intel | |
| target: x86_64-apple-darwin | |
| cross: false | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| cross: false | |
| # Windows builds | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| cross: false | |
| fail-fast: false | |
| defaults: | |
| run: | |
| working-directory: svm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| svm/target/ | |
| key: ${{ runner.os }}-${{ matrix.target }}-svm-cargo-${{ hashFiles('svm/Cargo.toml', 'svm/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.target }}-svm-cargo- | |
| ${{ runner.os }}-svm-cargo- | |
| - name: Install cross-compilation tools | |
| if: matrix.cross | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cross | |
| - name: Build project (cross) | |
| if: matrix.cross | |
| run: cross build --release --verbose --target ${{ matrix.target }} | |
| shell: bash | |
| - name: Build project (native) | |
| if: "!matrix.cross" | |
| run: cargo build --release --verbose --target ${{ matrix.target }} | |
| shell: bash | |
| - name: Run tests | |
| if: "!matrix.cross" | |
| run: cargo test --verbose --target ${{ matrix.target }} | |
| continue-on-error: true | |
| - name: Prepare executable (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| mkdir -p artifacts | |
| cp target/${{ matrix.target }}/release/svm artifacts/svm-${{ matrix.target }} | |
| chmod +x artifacts/svm-${{ matrix.target }} | |
| - name: Prepare executable (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path artifacts | |
| Copy-Item "target/${{ matrix.target }}/release/svm.exe" "artifacts/svm-${{ matrix.target }}.exe" | |
| - name: Upload executable artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: svm-${{ matrix.target }} | |
| path: svm/artifacts/svm-* | |
| if-no-files-found: error | |
| haoma-build: | |
| name: Build Rust (haoma) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # Linux builds | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| cross: false | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| cross: true | |
| # macOS builds | |
| - os: macos-15-intel | |
| target: x86_64-apple-darwin | |
| cross: false | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| cross: false | |
| # Windows builds | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| cross: false | |
| - os: windows-latest | |
| target: i686-pc-windows-msvc | |
| cross: false | |
| - os: windows-latest | |
| target: x86_64-pc-windows-gnu | |
| cross: false | |
| - os: windows-latest | |
| target: i686-pc-windows-gnu | |
| cross: false | |
| fail-fast: false | |
| defaults: | |
| run: | |
| working-directory: haoma | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| haoma/target/ | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('haoma/Cargo.toml', 'haoma/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.target }}-cargo- | |
| ${{ runner.os }}-cargo- | |
| - name: Setup MinGW (Windows GNU) | |
| if: contains(matrix.target, 'windows-gnu') | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ contains(matrix.target, 'x86_64') && 'MINGW64' || 'MINGW32' }} | |
| install: >- | |
| mingw-w64-${{ contains(matrix.target, 'x86_64') && 'x86_64' || 'i686' }}-gcc | |
| mingw-w64-${{ contains(matrix.target, 'x86_64') && 'x86_64' || 'i686' }}-rust | |
| mingw-w64-${{ contains(matrix.target, 'x86_64') && 'x86_64' || 'i686' }}-toolchain | |
| update: true | |
| path-type: inherit | |
| - name: Install cross-compilation tools | |
| if: matrix.cross | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cross | |
| - name: Build project (cross) | |
| if: matrix.cross | |
| working-directory: haoma | |
| run: cross build --verbose --all-features --target ${{ matrix.target }} | |
| shell: bash | |
| - name: Build project (native - Windows GNU) | |
| if: "!matrix.cross && contains(matrix.target, 'windows-gnu')" | |
| working-directory: haoma | |
| shell: msys2 {0} | |
| run: cargo build --verbose --all-features --target ${{ matrix.target }} | |
| - name: Build project (native - other) | |
| if: "!matrix.cross && !contains(matrix.target, 'windows-gnu')" | |
| working-directory: haoma | |
| run: cargo build --verbose --all-features --target ${{ matrix.target }} | |
| shell: bash | |
| - name: Run tests | |
| if: "!matrix.cross" | |
| working-directory: haoma | |
| run: cargo test --verbose --all-features --target ${{ matrix.target }} | |
| continue-on-error: true | |
| - name: Build release (cross) | |
| if: matrix.cross | |
| working-directory: haoma | |
| run: cross build --release --verbose --target ${{ matrix.target }} | |
| shell: bash | |
| - name: Build release (native - Windows GNU) | |
| if: "!matrix.cross && contains(matrix.target, 'windows-gnu')" | |
| working-directory: haoma | |
| shell: msys2 {0} | |
| run: cargo build --release --verbose --target ${{ matrix.target }} | |
| - name: Build release (native - other) | |
| if: "!matrix.cross && !contains(matrix.target, 'windows-gnu')" | |
| working-directory: haoma | |
| run: cargo build --release --verbose --target ${{ matrix.target }} | |
| shell: bash | |
| - name: Prepare executable (Unix) | |
| if: runner.os != 'Windows' | |
| working-directory: haoma | |
| run: | | |
| mkdir -p artifacts | |
| cp target/${{ matrix.target }}/release/haoma artifacts/haoma-${{ matrix.target }} | |
| chmod +x artifacts/haoma-${{ matrix.target }} | |
| - name: Prepare executable (Windows MSVC) | |
| if: runner.os == 'Windows' && contains(matrix.target, 'msvc') | |
| working-directory: haoma | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path artifacts | |
| Copy-Item "target/${{ matrix.target }}/release/haoma.exe" "artifacts/haoma-${{ matrix.target }}.exe" | |
| - name: Prepare executable (Windows GNU) | |
| if: runner.os == 'Windows' && contains(matrix.target, 'gnu') | |
| working-directory: haoma | |
| shell: msys2 {0} | |
| run: | | |
| mkdir -p artifacts | |
| cp "target/${{ matrix.target }}/release/haoma.exe" "artifacts/haoma-${{ matrix.target }}.exe" | |
| - name: Upload executable artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: haoma-${{ matrix.target }} | |
| path: haoma/artifacts/haoma-* | |
| if-no-files-found: error | |
| lean-build: | |
| name: Build Lean (${{ matrix.project }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-linux | |
| project: compiler | |
| - os: macos-latest | |
| target: aarch64-darwin | |
| project: compiler | |
| - os: windows-latest | |
| target: x86_64-windows | |
| project: compiler | |
| - os: ubuntu-latest | |
| target: x86_64-linux | |
| project: souls | |
| - os: macos-latest | |
| target: aarch64-darwin | |
| project: souls | |
| - os: windows-latest | |
| target: x86_64-windows | |
| project: souls | |
| fail-fast: false | |
| defaults: | |
| run: | |
| working-directory: ${{ matrix.project }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install elan | |
| run: | | |
| curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none | |
| echo "$HOME/.elan/bin" >> $GITHUB_PATH | |
| shell: bash | |
| - name: Update Lake packages | |
| run: lake update | |
| shell: bash | |
| - name: Build ${{ matrix.project }} | |
| run: lake build | |
| shell: bash | |
| continue-on-error: true | |
| - name: Run ${{ matrix.project }} tests | |
| run: lake test | |
| shell: bash | |
| continue-on-error: true | |
| - name: Prepare artifacts (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| mkdir -p artifacts | |
| if [ -d ".lake/build/bin" ]; then | |
| for bin in .lake/build/bin/*; do | |
| if [ -f "$bin" ] && [ -x "$bin" ]; then | |
| name=$(basename "$bin") | |
| cp "$bin" "artifacts/${name}-${{ matrix.target }}" | |
| chmod +x "artifacts/${name}-${{ matrix.target }}" | |
| fi | |
| done | |
| fi | |
| shell: bash | |
| - name: Prepare artifacts (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path artifacts | |
| if (Test-Path ".lake/build/bin") { | |
| Get-ChildItem ".lake/build/bin/*.exe" | ForEach-Object { | |
| $name = $_.BaseName | |
| Copy-Item $_.FullName "artifacts/${name}-${{ matrix.target }}.exe" | |
| } | |
| } | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.project }}-${{ matrix.target }} | |
| path: ${{ matrix.project }}/artifacts/* | |
| if-no-files-found: warn | |
| lint: | |
| name: Lint and Format Check | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Check haoma formatting | |
| working-directory: haoma | |
| run: cargo fmt --all -- --check | |
| - name: Run Clippy on haoma | |
| working-directory: haoma | |
| run: cargo clippy --all-targets --all-features | |
| continue-on-error: true | |
| - name: Check svm formatting | |
| working-directory: svm | |
| run: cargo fmt --all -- --check | |
| - name: Run Clippy on svm | |
| working-directory: svm | |
| run: cargo clippy --all-targets --all-features | |
| continue-on-error: true | |
| check-all: | |
| name: All Checks Passed | |
| needs: [svm-build, haoma-build, lean-build, lint] | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Check build results | |
| run: | | |
| if [ "${{ needs.svm-build.result }}" != "success" ]; then | |
| echo "svm build failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.haoma-build.result }}" != "success" ]; then | |
| echo "Rust build failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.lean-build.result }}" != "success" ]; then | |
| echo "Lean build failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.lint.result }}" == "failure" ]; then | |
| echo "⚠️ Lint checks failed (non-blocking)" | |
| fi | |
| echo "All checks passed!" |