File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 8
8
jobs :
9
9
build :
10
10
runs-on : ubuntu-latest
11
+ if : github.repository == 'redis/redis-snap'
11
12
steps :
12
13
- uses : actions/checkout@v2
13
14
- name : Determine version
@@ -18,12 +19,28 @@ jobs:
18
19
repository : redis/redis
19
20
ref : ${{ env.VERSION }}
20
21
path : redis
22
+ - name : Prepare for cross-compilation
23
+ run : |
24
+ sudo dpkg --add-architecture arm64
25
+ sudo sed -i 's/^deb /deb [arch=amd64] /g' /etc/apt/sources.list
26
+ cat <<_END_ | sudo tee /etc/apt/sources.list.d/crosscompile.list
27
+ deb [arch=arm64] http://ports.ubuntu.com $(lsb_release -cs) main universe
28
+ deb [arch=arm64] http://ports.ubuntu.com $(lsb_release -cs)-updates main universe
29
+ _END_
21
30
- name : Setup Snapcraft
22
31
run : |
23
- sudo snap install snapcraft --classic
24
- echo "$SNAP_TOKEN" | snapcraft login --with -
25
- snapcraft
26
- snapcraft upload --release=stable *.snap
32
+ sudo snap install snapcraft --classic
33
+ echo "$SNAP_TOKEN" | snapcraft login --with -
27
34
env :
28
35
SNAP_TOKEN : ${{secrets.SNAP_TOKEN}}
36
+ - name : Build amd64
37
+ env :
29
38
SNAPCRAFT_BUILD_ENVIRONMENT : host
39
+ run : snapcraft --target-arch amd64 --destructive-mode --enable-experimental-target-arch
40
+ - name : Build arm64
41
+ env :
42
+ SNAPCRAFT_BUILD_ENVIRONMENT : host
43
+ run : snapcraft --target-arch arm64 --destructive-mode --enable-experimental-target-arch
44
+ - name : Upload
45
+ run : |
46
+ for f in *.snap; do snapcraft upload --release=stable $f; done
You can’t perform that action at this time.
0 commit comments