summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml80
1 files changed, 70 insertions, 10 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6f0535b..f058a1c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,16 +17,35 @@ jobs:
- {VERSION: "3.10", TOXENV: "py310"}
name: "Python ${{ matrix.PYTHON.VERSION }} on macOS"
steps:
- - uses: actions/checkout@v2.4.0
+ - uses: actions/checkout@v3.0.2
- name: Setup python
- uses: actions/setup-python@v3
+ id: setup-python
+ uses: actions/setup-python@v3.1.2
with:
python-version: ${{ matrix.PYTHON.VERSION }}
-
+ - uses: actions/cache@v3.0.2
+ timeout-minutes: 5
+ with:
+ path: |
+ ~/Library/Caches/pip/
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/registry/src/
+ ~/.cargo/git/db/
+ src/_bcrypt/target/
+ key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+ - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
+ with:
+ profile: minimal
+ toolchain: 'stable'
+ override: true
+ default: true
- run: pip install tox
- run: tox
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
+ CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}
windows:
runs-on: windows-latest
@@ -40,13 +59,26 @@ jobs:
- {VERSION: "3.10", TOXENV: "py310"}
name: "Python ${{ matrix.PYTHON.VERSION }} on ${{ matrix.WINDOWS.WINDOWS }}"
steps:
- - uses: actions/checkout@v2.4.0
+ - uses: actions/checkout@v3.0.2
- name: Setup python
- uses: actions/setup-python@v3
+ id: setup-python
+ uses: actions/setup-python@v3.1.2
with:
python-version: ${{ matrix.PYTHON.VERSION }}
architecture: ${{ matrix.WINDOWS.ARCH }}
- - uses: actions-rs/toolchain@v1.0.7
+ - uses: actions/cache@v3.0.2
+ timeout-minutes: 5
+ with:
+ path: |
+ ~/AppData/Local/pip/Cache/
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/registry/src/
+ ~/.cargo/git/db/
+ src/_bcrypt/target/
+ key: ${{ runner.os }}-${{ matrix.WINDOWS.ARCH }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+ - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
profile: minimal
toolchain: stable
@@ -58,6 +90,7 @@ jobs:
- run: tox
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
+ CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}
linux:
runs-on: ubuntu-latest
strategy:
@@ -80,12 +113,25 @@ jobs:
- {VERSION: "3.10", TOXENV: "py310", RUST_VERSION: "nightly"}
name: "${{ matrix.PYTHON.TOXENV }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}"
steps:
- - uses: actions/checkout@v2.4.0
+ - uses: actions/checkout@v3.0.2
- name: Setup python
- uses: actions/setup-python@v3
+ id: setup-python
+ uses: actions/setup-python@v3.1.2
with:
python-version: ${{ matrix.PYTHON.VERSION }}
- - uses: actions-rs/toolchain@v1.0.7
+ - uses: actions/cache@v3.0.2
+ timeout-minutes: 5
+ with:
+ path: |
+ ~/.cache/pip/
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/registry/src/
+ ~/.cargo/git/db/
+ src/_bcrypt/target/
+ key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+ - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
profile: minimal
toolchain: ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}
@@ -96,6 +142,7 @@ jobs:
- run: tox
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
+ CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}
linux-distros:
runs-on: ubuntu-latest
@@ -106,10 +153,23 @@ jobs:
- {IMAGE: "alpine", TOXENV: "py310"}
name: "${{ matrix.IMAGE.TOXENV }} on ${{ matrix.IMAGE.IMAGE }}"
steps:
- - uses: actions/checkout@v3.0.1
+ - uses: actions/checkout@v3.0.2
with:
persist-credentials: false
+ - uses: actions/cache@v3.0.2
+ timeout-minutes: 5
+ with:
+ path: |
+ ~/.cache/pip/
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/registry/src/
+ ~/.cargo/git/db/
+ src/_bcrypt/target/
+ key: ${{ runner.os }}-${{ matrix.IMAGE.IMAGE }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: '/venv/bin/tox'
env:
TOXENV: ${{ matrix.IMAGE.TOXENV }}
RUSTUP_HOME: /root/.rustup
+ CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}