Unstable #883
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unstable | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
if: github.repository == 'redis/redis-snap' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/checkout@v3 | |
with: | |
repository: redis/redis | |
path: redis | |
- name: Prepare for cross-compilation | |
run: | | |
sudo dpkg --add-architecture arm64 | |
sudo sed -i 's/^deb /deb [arch=amd64] /g' /etc/apt/sources.list | |
cat <<_END_ | sudo tee /etc/apt/sources.list.d/crosscompile.list | |
deb [arch=arm64] http://ports.ubuntu.com $(lsb_release -cs) main universe | |
deb [arch=arm64] http://ports.ubuntu.com $(lsb_release -cs)-updates main universe | |
_END_ | |
- name: Setup Snapcraft | |
run: | | |
sudo snap install snapcraft --classic | |
- name: Build amd64 | |
env: | |
SNAPCRAFT_BUILD_ENVIRONMENT: host | |
SNAPCRAFT_BUILD_INFO: 1 | |
run: snapcraft --target-arch amd64 --destructive-mode --enable-experimental-target-arch | |
- name: Build arm64 | |
env: | |
SNAPCRAFT_BUILD_ENVIRONMENT: host | |
SNAPCRAFT_BUILD_INFO: 1 | |
run: snapcraft --target-arch arm64 --destructive-mode --enable-experimental-target-arch | |
- name: Upload | |
run: | | |
for f in *.snap; do snapcraft upload --release=edge $f; done | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAP_TOKEN}} |