diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 27b70242..cd9a8a8f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -128,11 +128,26 @@ jobs: path: dist linux: - runs-on: ubicloud-standard-4 + runs-on: ${{ matrix.platform.os }} strategy: matrix: + platform: + - os: ubicloud-standard-2 + target: x86_64 + - os: ubicloud-standard-2 + target: i686 + - os: ubicloud-standard-2-arm + target: aarch64 python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - target: [x86_64, i686] + include: + - platform: + os: ubicloud-standard-2-arm + target: aarch64 + python-version: pypy3.9 + - platform: + os: ubicloud-standard-2-arm + target: aarch64 + python-version: pypy3.10 steps: - uses: actions/checkout@v3 - uses: actions/cache@v3 @@ -143,7 +158,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-${{ matrix.target }}-${{ matrix.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-${{ matrix.platform.target }}-${{ matrix.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Tests @@ -156,22 +171,22 @@ jobs: - name: Build Wheels - cramjam-python uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} + target: ${{ matrix.platform.target }} manylinux: auto args: -i ${{ matrix.python-version }} --release --out dist --manifest-path cramjam-python/Cargo.toml - name: Build Wheels - cramjam-cli uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} + target: ${{ matrix.platform.target }} manylinux: auto args: -i ${{ matrix.python-version }} --release --out dist --manifest-path cramjam-cli/Cargo.toml - name: Python UnitTest - cramjam-python - if: matrix.target == 'x86_64' + if: matrix.platform.target == 'x86_64' run: | pip install cramjam[dev] --find-links dist --force-reinstall python -m pytest cramjam-python -vs --ignore **/benchmarks - name: Python UnitTest - cramjam-cli - if: matrix.target == 'x86_64' + if: matrix.platform.target == 'x86_64' run: | pip install cramjam-cli --no-index --find-links dist --force-reinstall python -m pytest cramjam-cli -vs --ignore **/benchmarks @@ -182,7 +197,7 @@ jobs: path: dist linux-cross: - runs-on: ubicloud-standard-4 + runs-on: ubicloud-standard-2 strategy: matrix: python: @@ -192,12 +207,7 @@ jobs: - '3.10' - '3.11' - '3.12' - target: [aarch64, armv7, s390x, ppc64le] - include: - - python: pypy3.9 - target: aarch64 - - python: pypy3.10 - target: aarch64 + target: [armv7, s390x, ppc64le] steps: - uses: actions/checkout@v3 - uses: actions/cache@v3 @@ -259,7 +269,7 @@ jobs: fail-fast: false matrix: platform: - - os: ubicloud-standard-4 + - os: ubicloud-standard-2 flags: '' - os: macos-13 flags: ''