Skip to content

Commit

Permalink
fix path for github actions after rust workspace update (#565)
Browse files Browse the repository at this point in the history
* fix path for github actions after rust workspace update

* fix caching for rust
  • Loading branch information
Esgrove authored Nov 11, 2024
1 parent bf9a1b1 commit 61c6997
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 29 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:

- uses: Swatinem/[email protected]
if: ${{ matrix.lang == 'rust'}}
with:
workspaces: ./rust -> target

- uses: actions/setup-go@v5
if: ${{ matrix.lang == 'go'}}
Expand Down Expand Up @@ -86,7 +84,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: 3.x
cache: pip

- name: Install zip
Expand Down Expand Up @@ -237,7 +235,7 @@ jobs:
- name: Check help output
run: |
echo "============================ Python-pyo3 Vault CLI ==========================="
vault --help
vault -h
echo "------------------------------------------------------------------------------"
echo "================================ Rust Vault CLI =============================="
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: 3.x
cache: pip

- name: Install Python dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: 3.x

- name: Install dependencies
run: |
Expand Down
27 changes: 6 additions & 21 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ on:
paths:
- ".github/workflows/rust.yml"
- "**.rs"
- "rust/Cargo.lock"
- "rust/Cargo.toml"
- "python-pyo3/Cargo.lock"
- "Cargo.lock"
- "Cargo.toml"
- "python-pyo3/Cargo.toml"
- "rust/Cargo.toml"
pull_request:
paths:
- ".github/workflows/rust.yml"
- "**.rs"
- "rust/Cargo.lock"
- "rust/Cargo.toml"
- "python-pyo3/Cargo.lock"
- "Cargo.lock"
- "Cargo.toml"
- "python-pyo3/Cargo.toml"
- "rust/Cargo.toml"

# Cancel previous runs for PRs but not pushes to main
concurrency:
Expand Down Expand Up @@ -47,21 +47,6 @@ jobs:
components: clippy

- uses: Swatinem/[email protected]
with:
workspaces: ./rust -> target

- name: Set up cargo cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Build
run: cargo build
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Share version definiton for both Rust and Python-pyo3 packages
# Share version definition for both Rust and Python-pyo3 packages
[workspace]
members = ["rust", "python-pyo3"]
resolver = "2"
Expand Down
2 changes: 1 addition & 1 deletion rust/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ else
fi

rm -f "$executable"
mv ./target/release/"$executable" "$executable"
mv ../target/release/"$executable" "$executable"
file "$executable"
./"$executable" --version

0 comments on commit 61c6997

Please sign in to comment.