Skip to content
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
71 changes: 22 additions & 49 deletions .github/workflows/casper-node-launcher-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,36 @@ name: Continuous Integration
jobs:
test:
name: Test Suite
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
strategy:
matrix:
include:
- os: ubuntu-20.04
code_name: focal

fmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
runs-on: ${{ matrix.os }}

clippy:
name: Clippy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

audit:
name: Audit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo install cargo-audit
- uses: actions-rs/cargo@v1
with:
command: audit
args: --deny warnings --ignore RUSTSEC-2021-0145
- name: rustup setup
run: rustup component add rustfmt clippy

- name: cargo setup
run: cargo install cargo-audit

- name: fmt
run: cargo fmt -- --check

- name: clippy
run: cargo clippy -- -D warnings

- name: audit
run: cargo audit --deny warnings --ignore RUSTSEC-2024-0375 --ignore RUSTSEC-2021-0145

- name: test
run: cargo test
81 changes: 77 additions & 4 deletions .github/workflows/casper-node-launcher-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: publish-casper-node-launcher
on:
push:
tags:
- "v*"
- "v*.*.*"

jobs:
publish_deb:
Expand All @@ -18,14 +18,13 @@ jobs:

steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c #v1.4.0

- name: Install deps
run: |
echo "deb http://repo.aptly.info/ squeeze main" | sudo tee -a /etc/apt/sources.list.d/aptly.list
wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y awscli aptly=1.2.0
sudo apt-get install -y aptly=1.4.0
aptly config show

- name: Import GPG key
Expand Down Expand Up @@ -64,4 +63,78 @@ jobs:
PATHS: "/*"
AWS_REGION: ${{ secrets.APTLY_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.APTLY_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.APTLY_SECRET_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.APTLY_SECRET_KEY }}

---
name: publish-casper-sidecar-deb
permissions:
contents: read
id-token: write

on:
push:
tags:
- "v*.*.*"

jobs:
publish_deb:
strategy:
matrix:
include:
- os: ubuntu-20.04
code_name: focal
# - os: ubuntu-22.04
# code_name: jammy
# - os: ubuntu-24.04
# code_name: noble

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ACCESS_ROLE_REPO }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ secrets.AWS_ACCESS_REGION_REPO }}

- name: Install deps
run: |
echo "deb http://repo.aptly.info/ squeeze main" | sudo tee -a /etc/apt/sources.list.d/aptly.list
wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y aptly=1.4.0
aptly config show

- name: update toolchain
run: rustup update nightly

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@c8bb57c57e8df1be8c73ff3d59deab1dbc00e0d1 #v5.1.0
with:
gpg_private_key: ${{ secrets.APTLY_GPG_KEY }}
passphrase: ${{ secrets.APTLY_GPG_PASS }}

- name: Install cargo deb
run: cargo install cargo-deb

- name: Cargo deb
run: cargo deb --package casper-sidecar --variant ${{ matrix.code_name }}

- name: Upload binaries to repo
env:
PLUGIN_REPO_NAME: ${{ secrets.AWS_BUCKET_REPO }}
PLUGIN_REGION: ${{ secrets.AWS_ACCESS_REGION_REPO }}
PLUGIN_GPG_KEY: ${{ secrets.APTLY_GPG_KEY }}
PLUGIN_GPG_PASS: ${{ secrets.APTLY_GPG_PASS }}
PLUGIN_ACL: 'private'
PLUGIN_PREFIX: 'releases'
PLUGIN_DEB_PATH: './target/debian'
PLUGIN_OS_CODENAME: ${{ matrix.code_name }}
run: ./ci/publish_deb_to_repo.sh

- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_REPO }} --paths "/*"
104 changes: 0 additions & 104 deletions .rpm/casper-node-launcher.spec

This file was deleted.

Loading
Loading