mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:43:24 +00:00
snap: refresh for ubuntu-latest
being 22.04
Signed-off-by: Michał Sawicz (Saviq) <michal@sawicz.net>
This commit is contained in:
parent
1b5de2d33b
commit
76c4b76027
1 changed files with 11 additions and 28 deletions
39
.github/workflows/linux-snap.yml
vendored
39
.github/workflows/linux-snap.yml
vendored
|
@ -12,27 +12,22 @@ jobs:
|
|||
Snap:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
SNAPCRAFT_BUILD_INFO: 1
|
||||
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: Install Snapcraft
|
||||
uses: samuelmeuli/action-snapcraft@v1
|
||||
|
||||
- name: Setup LXD
|
||||
uses: whywaita/setup-lxd@v1
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# Needed for version determination to work
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up LXD
|
||||
uses: canonical/setup-lxd@main
|
||||
|
||||
- name: Set up CCache
|
||||
id: setup-ccache
|
||||
run: |
|
||||
sudo apt-get install ccache
|
||||
mkdir -p ${HOME}/.ccache
|
||||
ccache --max-size=2G
|
||||
/snap/bin/lxc profile device add default ccache disk source=${HOME}/.ccache/ path=/root/.ccache
|
||||
|
||||
|
@ -51,30 +46,18 @@ jobs:
|
|||
ccache-${{ runner.os }}-
|
||||
path: ~/.ccache/**
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
# Build the `subsurface` part.
|
||||
/snap/bin/snapcraft build --use-lxd subsurface
|
||||
- name: Build and verify the snap
|
||||
uses: canonical/actions/build-snap@release
|
||||
id: build-snap
|
||||
with:
|
||||
setup-lxd: false
|
||||
|
||||
- name: Clear CCache stats
|
||||
run: ccache --show-stats --zero-stats
|
||||
|
||||
- name: Build and verify the snap
|
||||
id: build-snap
|
||||
env:
|
||||
SNAP_ENFORCE_RESQUASHFS: 0
|
||||
run: |
|
||||
# Actually build the snap.
|
||||
/snap/bin/snapcraft --use-lxd
|
||||
|
||||
sudo snap install review-tools
|
||||
/snap/bin/review-tools.snap-review *.snap
|
||||
|
||||
echo "::set-output name=snap-file::$( ls *.snap )"
|
||||
|
||||
- name: Upload the snap
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.build-snap.outputs.snap-file }}
|
||||
path: ${{ steps.build-snap.outputs.snap-file }}
|
||||
name: ${{ steps.build-snap.outputs.snap-name }}
|
||||
path: ${{ steps.build-snap.outputs.snap-path }}
|
||||
if-no-files-found: error
|
||||
|
|
Loading…
Add table
Reference in a new issue