summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2022-05-28 09:25:19 +0800
committerGitHub <noreply@github.com>2022-05-27 21:25:19 -0400
commitbffa10fce7a639db41fe0c5c1453a3ad7b23827c (patch)
tree780cb9f3c7583314e051ef327a5caceff582cc6f
parenta0c4e5497628fb69d64de98902d7996ece01d604 (diff)
downloadpy-bcrypt-git-bffa10fce7a639db41fe0c5c1453a3ad7b23827c.tar.gz
CI updates (#341)
* CI updates add caching, pin rs toolchain hash * fix syntax * add missing env var also forgot to do caching on the distros job * oops * manifest fixes
-rw-r--r--.github/workflows/ci.yml80
-rw-r--r--MANIFEST.in4
2 files changed, 73 insertions, 11 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) }}
diff --git a/MANIFEST.in b/MANIFEST.in
index e39d31d..b948640 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -3,7 +3,6 @@ include LICENSE README.rst
include pyproject.toml
include tox.ini .coveragerc
-include src/build_bcrypt.py
recursive-include src py.typed *.pyi
recursive-include src/_bcrypt Cargo.toml Cargo.lock *.rs
@@ -13,3 +12,6 @@ exclude requirements.txt release.py mypy.ini
recursive-exclude .github *
recursive-exclude .circleci *
+
+exclude src/_bcrypt/target
+recursive-exclude src/_bcrypt/target *