Skip to content

Commit

Permalink
Merge pull request #141 from dunxen/2024-07-updateci
Browse files Browse the repository at this point in the history
Update CI actions and replace unmaintained actions
  • Loading branch information
orbitalturtle authored Jul 23, 2024
2 parents 7f9e0f9 + 8fc2c32 commit c505ca4
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 342 deletions.
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

0 comments on commit c505ca4

Please sign in to comment.