Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI actions and replace unmaintained actions #141

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-audit
- run: cargo audit
38 changes: 9 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,17 @@ on:
env:
GO_VERSION: 1.21.0

RUST_VERSION: 1.78.0

jobs:
build_and_format:
name: LNDK Rust Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt-get install protobuf-compiler
- uses: actions-rs/cargo@v1
name: cargo build
with:
command: build
args: --release --all-features
- uses: actions-rs/cargo@v1
name: cargo fmt
with:
command: fmt
args: -- --config unstable_features=true --config wrap_comments=true --config comment_width=100 --check
- uses: actions-rs/cargo@v1
name: cargo clippy
with:
command: clippy
args: -- --deny warnings
- run: cargo build --release --all-features
- run: cargo fmt -- --config unstable_features=true --config wrap_comments=true --config comment_width=100 --check
- run: cargo clippy -- --deny warnings

########################
# run ubuntu integration tests
Expand All @@ -44,12 +28,10 @@ jobs:
name: run ubuntu unit and integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.GO_VERSION }}
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt-get install protobuf-compiler
- name: setup go ${{ env.GO_VERSION }}
uses: lightningnetwork/lnd/.github/actions/setup-go@v0-16-4-branch
Expand All @@ -66,10 +48,8 @@ jobs:
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt-get install protobuf-compiler
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
# title/body based on your changelogs.

name: Release

permissions:
contents: write
id-token: write
attestations: write
"attestations": "write"
"contents": "write"
"id-token": "write"

# This task will run whenever you push a git tag that looks like a version
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
Expand Down Expand Up @@ -64,7 +63,7 @@ jobs:
# we specify bash to get pipefail; it guards against the `curl` command
# failing. otherwise `sh` won't catch that `curl` returned non-0
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.17.0/cargo-dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.18.0/cargo-dist-installer.sh | sh"
- name: Cache cargo-dist
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -118,10 +117,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: swatinem/rust-cache@v2
with:
key: ${{ join(matrix.targets, '-') }}
cache-provider: ${{ matrix.cache_provider }}
- name: Install cargo-dist
run: ${{ matrix.install_dist }}
# Get the dist-manifest
Expand Down
Loading
Loading