Skip to content

Commit

Permalink
snap: Add rust to build-packages (#682)
Browse files Browse the repository at this point in the history
* snap: Add rust to build-packages

When building the snap on s390x some Python modules need to compile
their extensions (rust based), this is not needed on amd64 since pypi
has compiled packages available.

This change add rustc, cargo and pkg-config to the list of
build-packages in the snapcraft.yaml definition.

* Migrate gh action actions/upload-artifact@v4

* Migration gh action actions/download-artifact@v4

The backport was adjusted to use build-snap.yml workflow instead of
test.yml

(cherry picked from commit b8747e0)
  • Loading branch information
freyes committed Nov 13, 2024
1 parent bef504f commit 0f9ff96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ name: Build Snap
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
branches: [ master ]
pull_request

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -20,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: snapcore/action-build@v1
id: snapcraft
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: charm.snap
path: ${{ steps.snapcraft.outputs.snap }}
7 changes: 7 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ parts:
source: .
plugin: python
python-version: python3
build-packages:
- libffi-dev
- libpython3.10-dev
- python3-pip
- rustc
- cargo
- pkg-config
stage-packages:
- git-core
- libssl-dev
Expand Down

0 comments on commit 0f9ff96

Please sign in to comment.