chore: bump version to 0.4.0 #48
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] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.15.2 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Verify PocketPy vendor patchset | |
| run: python3 scripts/verify-pocketpy-patches.py --check-upstream | |
| - name: Build PocketPy runtime | |
| working-directory: pocketpy | |
| run: zig build -Doptimize=ReleaseSmall | |
| - name: Run compatibility tests | |
| run: python3 tests/compat_runner.py --report --ci | |
| - name: Run CLI unit tests | |
| run: | | |
| cp VERSION cli/src/VERSION | |
| cd cli && zig build test | |
| - name: Build CLI | |
| run: | | |
| cp VERSION cli/src/VERSION | |
| cd cli && zig build -Doptimize=ReleaseSmall | |
| - name: Build Loader | |
| working-directory: loader | |
| run: zig build -Doptimize=ReleaseSmall | |
| - name: Verify CLI runs | |
| run: ./cli/zig-out/bin/ucharm --version | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.15.2 | |
| - name: Check formatting (CLI) | |
| working-directory: cli | |
| run: zig fmt --check src/ | |
| - name: Check formatting (Loader) | |
| working-directory: loader | |
| run: zig fmt --check src/ | |
| - name: Check formatting (PocketPy) | |
| working-directory: pocketpy | |
| run: zig fmt --check src/ | |
| - name: Check formatting (Runtime) | |
| run: find runtime -name "*.zig" -exec zig fmt --check {} + | |
| build-matrix: | |
| name: Build (${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| target: aarch64-macos | |
| artifact: ucharm-macos-aarch64 | |
| - os: macos-latest | |
| target: x86_64-macos | |
| artifact: ucharm-macos-x86_64 | |
| - os: ubuntu-latest | |
| target: x86_64-linux | |
| artifact: ucharm-linux-x86_64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.15.2 | |
| - name: Build CLI for ${{ matrix.target }} | |
| run: | | |
| cp VERSION cli/src/VERSION | |
| cd cli && zig build -Doptimize=ReleaseSmall -Dtarget=${{ matrix.target }} | |
| mv zig-out/bin/ucharm ../${{ matrix.artifact }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }} |