[integer] Rewrite and fix type conversion from all integral scalar types #263
Workflow file for this run
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: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| defaults: | |
| run: | |
| shell: bash | |
| # Shared setup repeated per job (GitHub Actions has no job-level includes, | |
| # so we keep each job self-contained for clarity and parallelism). | |
| jobs: | |
| # ── Test: BigDecimal ───────────────────────────────────────────────────────── | |
| test-bigdecimal: | |
| name: Test BigDecimal | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Build packages | |
| run: | | |
| pixi run mojo package src/decimo && cp decimo.mojopkg tests/ | |
| - name: Run tests | |
| run: bash ./tests/test_bigdecimal.sh | |
| # ── Test: BigInt ───────────────────────────────────────────────────────────── | |
| test-bigint: | |
| name: Test BigInt | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Build packages | |
| run: | | |
| pixi run mojo package src/decimo && cp decimo.mojopkg tests/ | |
| - name: Run tests | |
| run: bash ./tests/test_bigint.sh | |
| # ── Test: BigUint ──────────────────────────────────────────────────────────── | |
| test-biguint: | |
| name: Test BigUint | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Build packages | |
| run: | | |
| pixi run mojo package src/decimo && cp decimo.mojopkg tests/ | |
| - name: Run tests | |
| run: bash ./tests/test_biguint.sh | |
| # ── Test: BigInt10 ─────────────────────────────────────────────────────────── | |
| test-bigint10: | |
| name: Test BigInt10 | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Build packages | |
| run: | | |
| pixi run mojo package src/decimo && cp decimo.mojopkg tests/ | |
| - name: Run tests | |
| run: bash ./tests/test_bigint10.sh | |
| # ── Test: Decimal128 ───────────────────────────────────────────────────────── | |
| test-decimal128: | |
| name: Test Decimal128 | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Build packages | |
| run: | | |
| pixi run mojo package src/decimo && cp decimo.mojopkg tests/ | |
| - name: Run tests | |
| run: bash ./tests/test_decimal128.sh | |
| # ── Test: TOML parser ───────────────────────────────────────────────────── | |
| test-toml: | |
| name: Test TOML parser | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Build packages | |
| run: | | |
| pixi run mojo package src/decimo && cp decimo.mojopkg tests/ | |
| - name: Run tests | |
| run: bash ./tests/test_toml.sh | |
| # ── Test: CLI ──────────────────────────────────────────────────────────────── | |
| test-cli: | |
| name: Test CLI | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Fetch argmojo | |
| run: pixi run fetch | |
| - name: Build CLI binary | |
| run: pixi run buildcli | |
| - name: Run tests | |
| run: bash ./tests/test_cli.sh | |
| # ── Test: Python bindings ──────────────────────────────────────────────────── | |
| test-python: | |
| name: Test Python bindings | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Build & run Python tests | |
| run: pixi run testpy | |
| # ── Format check ───────────────────────────────────────────────────────────── | |
| format-check: | |
| name: Format check | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 10 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pixi | |
| run: curl -fsSL https://pixi.sh/install.sh | sh | |
| - name: Add pixi to PATH | |
| run: | | |
| echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV | |
| echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
| - name: pixi install | |
| run: pixi install | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Run format check | |
| run: pre-commit run --all-files |