Skip to content

Commit de2b7a0

Browse files
committed
CI: Run gen-workflows for snapcraft
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
1 parent 987e798 commit de2b7a0

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

.github/workflows/linux-builds-on-master.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
include:
2828
- target: x86_64-unknown-linux-gnu
2929
run_tests: YES
30+
snap_arch: amd64
31+
- target: aarch64-unknown-linux-gnu # skip-pr
32+
snap_arch: arm64 # skip-pr
33+
- target: armv7-unknown-linux-gnueabihf
34+
snap_arch: armhf
3035
steps:
3136
- uses: actions/checkout@v2
3237
with:
@@ -134,6 +139,25 @@ jobs:
134139
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
135140
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
136141
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
142+
- name: Build a snapcraft configuration file
143+
run: |
144+
bash ci/snapcraft.bash
145+
if: matrix.snap_arch != ''
146+
env:
147+
DO_SNAP: 1
148+
SNAP_ARCH: ${{ matrix.snap_arch }}
149+
SNAP_EDGE: 1 # skip-stable
150+
- uses: snapcore/action-build@v1
151+
id: snapcraftbuild
152+
with:
153+
path: snapcraft
154+
if: matrix.snap_arch != ''
155+
- uses: snapcore/action-publish@v1
156+
with:
157+
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
158+
snap: ${{ steps.snapcraftbuild.outputs.snap }}
159+
release: edge # skip-pr skip-stable
160+
if: matrix.snap_arch != '' # skip-pr
137161
- name: Clear the cargo caches
138162
run: |
139163
cargo install cargo-cache --no-default-features --features ci-autoclean

.github/workflows/linux-builds-on-pr.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
include:
2323
- target: x86_64-unknown-linux-gnu
2424
run_tests: YES
25+
snap_arch: amd64
26+
- target: armv7-unknown-linux-gnueabihf
27+
snap_arch: armhf
2528
steps:
2629
- uses: actions/checkout@v2
2730
with:
@@ -129,6 +132,24 @@ jobs:
129132
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
130133
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
131134
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
135+
- name: Build a snapcraft configuration file
136+
run: |
137+
bash ci/snapcraft.bash
138+
if: matrix.snap_arch != ''
139+
env:
140+
DO_SNAP: 1
141+
SNAP_ARCH: ${{ matrix.snap_arch }}
142+
SNAP_EDGE: 1 # skip-stable
143+
- uses: snapcore/action-build@v1
144+
id: snapcraftbuild
145+
with:
146+
path: snapcraft
147+
if: matrix.snap_arch != ''
148+
- uses: snapcore/action-publish@v1
149+
with:
150+
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
151+
snap: ${{ steps.snapcraftbuild.outputs.snap }}
152+
if: matrix.snap_arch == 'not-for-prs' # skip-master skip-stable
132153
- name: Clear the cargo caches
133154
run: |
134155
cargo install cargo-cache --no-default-features --features ci-autoclean

.github/workflows/linux-builds-on-stable.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ jobs:
4141
include:
4242
- target: x86_64-unknown-linux-gnu
4343
run_tests: YES
44+
snap_arch: amd64
45+
- target: i686-unknown-linux-gnu # skip-pr skip-master
46+
snap_arch: i386 # skip-pr skip-master
47+
- target: aarch64-unknown-linux-gnu # skip-pr
48+
snap_arch: arm64 # skip-pr
49+
- target: armv7-unknown-linux-gnueabihf
50+
snap_arch: armhf
51+
- target: powerpc64le-unknown-linux-gnu # skip-pr skip-master
52+
snap_arch: ppc64el # skip-pr skip-master
53+
- target: s390x-unknown-linux-gnu # skip-pr skip-master
54+
snap_arch: s390x # skip-pr skip-master
4455
steps:
4556
- uses: actions/checkout@v2
4657
with:
@@ -148,6 +159,24 @@ jobs:
148159
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
149160
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
150161
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
162+
- name: Build a snapcraft configuration file
163+
run: |
164+
bash ci/snapcraft.bash
165+
if: matrix.snap_arch != ''
166+
env:
167+
DO_SNAP: 1
168+
SNAP_ARCH: ${{ matrix.snap_arch }}
169+
- uses: snapcore/action-build@v1
170+
id: snapcraftbuild
171+
with:
172+
path: snapcraft
173+
if: matrix.snap_arch != ''
174+
- uses: snapcore/action-publish@v1
175+
with:
176+
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
177+
snap: ${{ steps.snapcraftbuild.outputs.snap }}
178+
release: beta # skip-pr skip-master
179+
if: matrix.snap_arch != '' # skip-pr
151180
- name: Clear the cargo caches
152181
run: |
153182
cargo install cargo-cache --no-default-features --features ci-autoclean

0 commit comments

Comments
 (0)