aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Michał Sawicz <michal@sawicz.net>2021-01-06 15:58:27 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-07 17:26:25 -0800
commita5e25c8e7d06f19f542737fd4b96bb98ceda2fbe (patch)
tree2c144d8eff8cafa48c96cba19b7f059248b7d7af
parent25d0fb7157d4bf7e4d65303c85cf9875578a362f (diff)
downloadsubsurface-a5e25c8e7d06f19f542737fd4b96bb98ceda2fbe.tar.gz
[snap] add Linux Snap workflow
This will build and verify the snap on pull requests to `master`. Signed-off-by: Michał Sawicz <michal@sawicz.net>
-rw-r--r--.github/workflows/linux-snap.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/linux-snap.yml b/.github/workflows/linux-snap.yml
new file mode 100644
index 000000000..e1718c55d
--- /dev/null
+++ b/.github/workflows/linux-snap.yml
@@ -0,0 +1,54 @@
+name: Linux Snap
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ Snap:
+ runs-on: ubuntu-latest
+
+ env:
+ SNAPCRAFT_BUILD_INFO: 1
+
+ timeout-minutes: 60
+ steps:
+ - name: Install Snapcraft
+ uses: samuelmeuli/action-snapcraft@v1
+ with:
+ use_lxd: true
+
+ - name: Check out code
+ uses: actions/checkout@v2
+ with:
+ # Needed for version determination to work
+ fetch-depth: 0
+
+ - name: Build
+ run: |
+ # Build the `subsurface` part.
+ sg lxd -c '/snap/bin/snapcraft build --use-lxd subsurface'
+
+ - name: Build and verify the snap
+ id: build-snap
+ env:
+ SNAP_ENFORCE_RESQUASHFS: 0
+ run: |
+ # Actually build the snap.
+ sg lxd -c '/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 }}
+ if-no-files-found: error