Skip to content

Fix ups for hotspot info #930

Fix ups for hotspot info

Fix ups for hotspot info #930

Workflow file for this run

name: CI
on:
push:
branches: [master]
tags: ["helium-wallet-v*"]
pull_request:
branches: [master]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings"
RUSTUP_MAX_RETRIES: 10
jobs:
hygiene:
runs-on: ubuntu-latest
steps:
- name: Setup | Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Setup | Tools
run: sudo apt-get install -y protobuf-compiler
- name: Setup | Cache
uses: Swatinem/rust-cache@v2
- name: Build | Hygiene
run: |
cargo fmt -- --check
cargo clippy --all-features --locked -- -D clippy::all
- name: Build | Test
run: |
cargo test
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Setup | Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Setup | Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup | Tools
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y protobuf-compiler
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install protobuf
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup | Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: Build | Compile
run: cargo build --all --locked --release
- name: Build | Name
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
ARCH=x86-64-linux
elif [ "$RUNNER_OS" == "macOS" ]; then
ARCH=x86-64-macos
else
echo "$RUNNER_OS not supported"
exit 1
fi
echo "NAME=helium-wallet-${ARCH}" >> $GITHUB_ENV
- name: Build | Package
shell: bash
run: |
mkdir $NAME
mv target/release/helium-wallet $NAME/
cp README.md $NAME/
cp LICENSE $NAME/
if [ "$RUNNER_OS" == "Linux" ]; then
tar -zcvf $NAME.tar.gz $NAME/
sha256sum -b --tag $NAME.tar.gz > $NAME.checksum
elif [ "$RUNNER_OS" == "macOS" ]; then
gtar -zcvf $NAME.tar.gz $NAME/
shasum -a 256 -b --tag $NAME.tar.gz > $NAME.checksum
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Build | Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.NAME }}
if-no-files-found: error
path: helium-wallet-*
release:
if: startsWith(github.ref, 'refs/tags/helium-wallet')
needs: [hygiene, build]
runs-on: ubuntu-latest
steps:
- name: Setup | Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Setup | Artifacts
uses: actions/download-artifact@v4
with:
path: helium-wallet-*
- name: Release | Artifacts
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
fail_on_unmatched_files: true
name: ${{github.ref_name}}
files: |
**/helium-wallet-*