Skip to content

Commit

Permalink
try sccache w/o cache action
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Mar 3, 2024
1 parent eb30c48 commit d131b1f
Showing 1 changed file with 12 additions and 45 deletions.
57 changes: 12 additions & 45 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ jobs:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -37,11 +28,13 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: x86_64
sccache: true
args: -i python --release --out dist --sdist --manifest-path cramjam-cli/Cargo.toml
- name: Build wheels - x86_64 - cramjam-python
uses: PyO3/maturin-action@v1
with:
target: x86_64
sccache: true
args: -i python --release --out dist --sdist --manifest-path cramjam-python/Cargo.toml
- name: Install built wheels - x86_64
run: |
Expand All @@ -51,11 +44,13 @@ jobs:
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11", "3.12"]'), matrix.python-version) }}
uses: PyO3/maturin-action@v1
with:
sccache: true
args: -i python --release --target universal2-apple-darwin --out dist --manifest-path cramjam-cli/Cargo.toml
- name: Build wheels - universal2
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11", "3.12"]'), matrix.python-version) }}
uses: PyO3/maturin-action@v1
with:
sccache: true
args: -i python --release --target universal2-apple-darwin --out dist --manifest-path cramjam-python/Cargo.toml
- name: Install built wheels - universal2
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11", "3.12"]'), matrix.python-version) }}
Expand Down Expand Up @@ -83,15 +78,6 @@ jobs:
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-${{ matrix.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -105,11 +91,13 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
sccache: true
args: -i python --release --out dist --manifest-path cramjam-python/Cargo.toml
- name: Build wheels - cramjam-cli
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
sccache: true
args: -i python --release --out dist --manifest-path cramjam-cli/Cargo.toml
- name: Install built wheel
run: |
Expand All @@ -135,15 +123,6 @@ jobs:
target: [x86_64, i686]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-${{ matrix.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Tests
Expand All @@ -158,12 +137,14 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: auto
sccache: true
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 }}
manylinux: auto
sccache: true
args: -i ${{ matrix.python-version }} --release --out dist --manifest-path cramjam-cli/Cargo.toml
- name: Python UnitTest - cramjam-python
if: matrix.target == 'x86_64'
Expand Down Expand Up @@ -200,25 +181,18 @@ jobs:
target: aarch64
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-${{ matrix.python }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Wheels cramjam-python
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
sccache: true
manylinux: auto
args: -i ${{ matrix.python }} --release --out dist --manifest-path cramjam-python/Cargo.toml
- name: Build Wheels cramjam-cli
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
sccache: true
manylinux: auto
args: -i ${{ matrix.python }} --release --out dist --manifest-path cramjam-cli/Cargo.toml
- uses: uraimo/run-on-arch-action@v2.3.0
Expand Down Expand Up @@ -270,28 +244,21 @@ jobs:
- pypy-3.10
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.python }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Build Wheels - cramjam-python
uses: PyO3/maturin-action@v1
with:
manylinux: auto
sccache: true
args: -i ${{ matrix.python }} --release ${{ matrix.platform.flags }} --out dist --manifest-path cramjam-python/Cargo.toml
- name: Build Wheels - cramjam-cli
if: ${{ matrix.platform.os != 'windows-latest' }}
uses: PyO3/maturin-action@v1
with:
manylinux: auto
sccache: true
args: -i ${{ matrix.python }} --release ${{ matrix.platform.flags }} --out dist --manifest-path cramjam-cli/Cargo.toml
- name: cramjam test
# TODO: I'm not sure but the actual collection of tests on windows using pypy3.10 takes forever and/or fails
Expand Down

0 comments on commit d131b1f

Please sign in to comment.