Skip to content

Commit

Permalink
fix: update rust and ci dependencies (#519)
Browse files Browse the repository at this point in the history
* ci: update github actions and macos runner

* fix: update dependencies

* ci: downgrade arduino/install-protoc to support '3.20' version scheme

* ci: install poetry before setting up poetry caching

* ci: cache pip, not poetry

* chore: downgrade dirs/dirs-sys to re-avoid new license

* ci: restore syphar/restore-virtualenv action

* chore: restore original Cargo.lock

* chore: install libffi 7

* chore: use platlib for python env

---------

Co-authored-by: Jake Selig <[email protected]>
  • Loading branch information
Shadow53 and jselig-rigetti authored Dec 18, 2024
1 parent c7b1d93 commit 059f907
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 17 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Run Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -21,7 +21,12 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: '3.20.1'
- name: Install libquil dependencies
run: sudo apt install -y libffi\* libblas\* liblapack\*
run: |
sudo apt update
sudo apt install -y libffi\* libblas\* liblapack\* curl
curl -O https://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb
sudo apt install -y ./libffi7_3.3-4_amd64.deb
sudo apt install -y libffi-dev
- name: Install libquil
run: |
curl https://raw.githubusercontent.com/rigetti/libquil/main/install.sh | bash -s 0.3.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- name: Install Knope
uses: knope-dev/action@v1
uses: knope-dev/action@v2.0.0
with:
version: 0.7.0 # Test before updating, breaking changes likely: https://github.com/knope-dev/action#install-latest-version
- run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- uses: Swatinem/rust-cache@v2
- name: Install cargo-make
uses: actions-rs/cargo@v1
Expand All @@ -39,7 +40,7 @@ jobs:
preview-branch: qcs-sdk-python-docs
- name: Deploy docs
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: crates/python/build/docs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
release-dry-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- name: Install Knope
uses: knope-dev/action@v1
uses: knope-dev/action@v2.0.0
with:
version: 0.6.1 # Test before updating, breaking changes likely: https://github.com/knope-dev/action#install-latest-version
version: 0.7.0 # Test before updating, breaking changes likely: https://github.com/knope-dev/action#install-latest-version
- name: Display Pending Release
run: knope release --dry-run
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
env:
CXXFLAGS: "-std=c++11"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
- run: echo "Publishing wheels"

macos:
runs-on: macos-12
runs-on: macos-latest
needs: [is-python-release, should-publish-wheels]
env:
CXXFLAGS: "-std=c++11 -stdlib=libc++"
strategy:
matrix:
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
Expand All @@ -52,7 +52,7 @@ jobs:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
Expand All @@ -72,7 +72,7 @@ jobs:
matrix:
target: [x86_64, ppc64le]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
Expand All @@ -94,7 +94,7 @@ jobs:
run: |
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
git config --system core.longpaths true
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
Expand All @@ -115,7 +115,7 @@ jobs:
matrix:
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion crates/python/Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[env]
PYTHONPATH = { script = [ "python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'" ] }
PYTHONPATH = { script = [ "python -c 'from sysconfig import get_path; print(get_path(\"platlib\"))'" ] }
RUST_BACKTRACE = 0

[tasks.check-venv]
Expand Down

0 comments on commit 059f907

Please sign in to comment.