Skip to content
Snippets Groups Projects
Commit 1b50f6967b36 authored by Paul Kehrer's avatar Paul Kehrer
Browse files

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
parent 98c9078251d0
No related branches found
No related tags found
No related merge requests found
......@@ -17,5 +17,5 @@
- {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
......@@ -21,4 +21,5 @@
- name: Setup python
uses: actions/setup-python@v3
id: setup-python
uses: actions/setup-python@v3.1.2
with:
python-version: ${{ matrix.PYTHON.VERSION }}
......@@ -23,7 +24,24 @@
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 }}
......@@ -26,7 +44,8 @@
- 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,5 +59,5 @@
- {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
......@@ -44,5 +63,6 @@
- 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 }}
......@@ -46,7 +66,19 @@
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 @@
- run: tox
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}
linux:
runs-on: ubuntu-latest
strategy:
......@@ -80,5 +113,5 @@
- {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
......@@ -84,4 +117,5 @@
- name: Setup python
uses: actions/setup-python@v3
id: setup-python
uses: actions/setup-python@v3.1.2
with:
python-version: ${{ matrix.PYTHON.VERSION }}
......@@ -86,6 +120,18 @@
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 @@
- run: tox
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}
linux-distros:
runs-on: ubuntu-latest
......@@ -106,6 +153,6 @@
- {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
......@@ -110,6 +157,18 @@
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
......@@ -112,4 +171,5 @@
- run: '/venv/bin/tox'
env:
TOXENV: ${{ matrix.IMAGE.TOXENV }}
RUSTUP_HOME: /root/.rustup
CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}
......@@ -3,7 +3,6 @@
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 @@
recursive-exclude .github *
recursive-exclude .circleci *
exclude src/_bcrypt/target
recursive-exclude src/_bcrypt/target *
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment