Fix compsite params #13
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: bootstrap-verify | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| verify: | |
| name: verify on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| cc: cc | |
| - os: macos-latest | |
| cc: cc | |
| - os: windows-latest | |
| cc: clang | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup toolchain install stable | |
| rustup component add rustfmt clippy | |
| - name: Install cc (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y build-essential | |
| - name: Install cc (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install --overwrite gcc || true | |
| - name: Install clang (Windows) | |
| if: runner.os == 'Windows' | |
| run: choco install llvm -y | |
| - name: Verify bootstrap | |
| env: | |
| CC: ${{ matrix.cc }} | |
| shell: bash | |
| run: ./checks/verify-bootstrap.sh | |
| - name: Native pipeline test | |
| env: | |
| CC: ${{ matrix.cc }} | |
| shell: bash | |
| run: | | |
| cargo run --bin xb -- --compile selfhost/compiler.x -o /tmp/compA | |
| cargo run --bin xb -- --compile selfhost/cgen.x -o /tmp/cgen1 | |
| EXE="" | |
| if [ -f /tmp/compA.exe ]; then EXE=".exe"; fi | |
| cat selfhost/compiler.x | /tmp/compA$EXE > /tmp/irA.txt | |
| cat /tmp/irA.txt | /tmp/cgen1$EXE > /tmp/compB.c | |
| $CC -o /tmp/compB /tmp/compB.c | |
| cat selfhost/compiler.x | /tmp/compB$EXE > /tmp/irB.txt | |
| diff /tmp/irA.txt /tmp/irB.txt | |
| cargo run --bin xb -- --emit-ir selfhost/compiler.x > /tmp/irRust.txt | |
| diff /tmp/irA.txt /tmp/irRust.txt | |
| echo "Native pipeline: all stages produce identical IR" |