Skip to content

CI: fast CI and enable flag #296

CI: fast CI and enable flag

CI: fast CI and enable flag #296

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
# FIXME: figure out why we need to clean after make if we
# want 'make strict' target to really happen without
# assuming the binaries from previous build are good
# (msbuild bug?)
jobs:
snap_pkg:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Install snap tools
run: |
sudo apt update
./scripts/install_snapcraft.sh
# hack to disable msbuild detection
# NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild,
# but that doesn't work because we get the following error when trying to install snapcraft via `snap install --classic`:
# > error: cannot communicate with server: Post "http://localhost/v2/snaps/snapcraft": dial unix /run/snapd.socket: connect: no such file or directory
- name: HACK to emulate msbuild uninstall
run: sudo rm `which msbuild`
- name: Generate snap package
run: |
# retry 3 times because of flakey nuget; TODO: remove retry when we migrate to .NET6 (removing LEGACY_FRAMEWORK support)
./scripts/snap_build.sh || ./scripts/snap_build.sh || ./scripts/snap_build.sh || ./scripts/snap_build.sh
- name: Install snap
# dangerous because it's a local snap (not one from the SnapStore)
run: sudo snap install --dangerous *.snap
- name: Test snap
run: geewallet --version
- uses: actions/upload-artifact@v3
name: Upload snap package as artifact
with:
name: snap
path: ./*.snap
- name: Upload snap package to Snap Store
env:
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
run: |
sudo apt update
./scripts/snap_release.sh
snap_pkg_beta:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Install snap tools
run: |
sudo apt update
./scripts/install_snapcraft.sh
# hack to disable msbuild detection
# NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild,
# but that doesn't work because we get the following error when trying to install snapcraft via `snap install --classic`:
# > error: cannot communicate with server: Post "http://localhost/v2/snaps/snapcraft": dial unix /run/snapd.socket: connect: no such file or directory
- name: HACK to emulate msbuild uninstall
run: sudo rm `which msbuild`
- name: Bump snap version
run: |
git submodule foreach git fetch --all && git submodule sync --recursive && git submodule update --init --recursive
dotnet fsi ./scripts/snap_bump.fsx
- name: Generate snap package
run: |
# retry 3 times because of flakey nuget; TODO: remove retry when we migrate to .NET6 (removing LEGACY_FRAMEWORK support)
./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit
- name: Install snap
# dangerous because it's a local snap (not one from the SnapStore)
run: sudo snap install --dangerous *.snap
- name: Test snap
run: geewallet --version
- uses: actions/upload-artifact@v3
name: Upload snap package as artifact
with:
name: snap_beta
path: ./*.snap
- name: Upload snap package to Snap Store
env:
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
run: |
sudo apt update
./scripts/snap_release.sh beta