ci: tryfix snap building
This commit is contained in:
@@ -94,13 +94,28 @@ jobs:
|
|||||||
snap:
|
snap:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
container:
|
||||||
snap-file: ${{ steps.build-snap.outputs.snap }}
|
# Official snapcraft image: an Ubuntu userland matching the snap base,
|
||||||
|
# with snapcraft preinstalled (no snapd/systemd/LXD required).
|
||||||
|
image: ghcr.io/canonical/snapcraft:8_core24
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install build prerequisites
|
||||||
|
run: |
|
||||||
|
apt-get update -q
|
||||||
|
apt-get install -y -q --no-install-recommends git curl
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: snapcore/action-build@v1
|
- name: Build snap
|
||||||
id: build-snap
|
run: |
|
||||||
- uses: actions/upload-artifact@v4
|
# GitHub Actions overrides the image entrypoint (pebble), which is
|
||||||
|
# what normally puts craftctl on PATH; restore it, allow git to run
|
||||||
|
# in the checked-out tree, and provide rustup for the rust plugin.
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
|
||||||
|
export PATH="/usr/libexec/snapcraft:$HOME/.cargo/bin:$PATH"
|
||||||
|
snapcraft pack --destructive-mode
|
||||||
|
- name: Upload snap artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: snap
|
name: snap
|
||||||
path: ${{ steps.build-snap.outputs.snap }}
|
path: ./*.snap
|
||||||
|
if-no-files-found: error
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ parts:
|
|||||||
craftctl set version=$(git rev-parse --short=11 HEAD)
|
craftctl set version=$(git rev-parse --short=11 HEAD)
|
||||||
craftctl set grade="devel"
|
craftctl set grade="devel"
|
||||||
build-packages:
|
build-packages:
|
||||||
|
- build-essential
|
||||||
- pkg-config
|
- pkg-config
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- libgpg-error-dev
|
- libgpg-error-dev
|
||||||
|
|||||||
Reference in New Issue
Block a user