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

[PLA-2071] Improves pipelines #61

Merged
merged 17 commits into from
Nov 8, 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [created]

jobs:
push:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release

- name: Archive Release
uses: vimtor/[email protected]
with:
files: target/release/wallet
dest: target/release/wallet-daemon_${{github.ref_name}}_x86_64-unknown-linux-gnu.zip

- name: Linux Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -29,19 +26,11 @@ jobs:
with:
files: target/release/wallet-daemon_${{github.ref_name}}_x86_64-unknown-linux-gnu.zip

release:
name: Release ${{ matrix.target }}
release-windows:
name: Release x86_64-pc-windows-gnu
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-apple-darwin
archive: zip
steps:
- name: Compile and release
if: "!startsWith(github.ref, 'refs/tags/')"
Expand All @@ -52,7 +41,37 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
RUSTTARGET: "x86_64-pc-windows-gnu"
UPLOAD_MODE: ${{ env.UPLOAD_MODE }}
TOOLCHAIN_VERSION: "1.82"
SRC_DIR: src
ARCHIVE_TYPES: ${{ matrix.archive }}
ARCHIVE_TYPES: "zip"

release-mac:
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: "1.82"
target: x86_64-apple-darwin
default: true
override: true
- name: Build for mac
run: cargo build --release
- name: Archive Release
uses: vimtor/[email protected]
with:
files: target/release/wallet
dest: target/release/wallet-daemon_${{github.ref_name}}_x86_64-apple-darwin.zip
- name: Linux Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: target/release/wallet-daemon_${{github.ref_name}}_x86_64-apple-darwin.zip
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on: push
name: Clippy check
name: Clippy Check
jobs:
clippy:
runs-on: ubuntu-latest
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/rust.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Test builds docker

on:
pull_request:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build docker image
run: |
docker build .
38 changes: 38 additions & 0 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test builds releases
on:
pull_request:
push:

jobs:
build-linux:
name: Build x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo build --release

build-windows:
name: Build x86_64-pc-windows-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rust-build/[email protected]
with:
RUSTTARGET: "x86_64-pc-windows-gnu"
UPLOAD_MODE: "none"
TOOLCHAIN_VERSION: "1.82"
SRC_DIR: src
ARCHIVE_TYPES: "zip"

build-mac:
name: Build x86_64-apple-darwin
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: "1.82"
target: x86_64-apple-darwin
default: true
override: true
- run: cargo build --release
Loading