mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-21 11:25:50 -05:00
use ubuntu 22, clean up packaging of binaries
This commit is contained in:
parent
dd67c973e0
commit
c8158ea0d0
6 changed files with 40 additions and 39 deletions
|
|
@ -13,7 +13,7 @@ jobs:
|
||||||
draft-cb-release:
|
draft-cb-release:
|
||||||
# Do not publish preview releases to CloudNebula
|
# Do not publish preview releases to CloudNebula
|
||||||
if: ${{ !contains(github.ref_name, 'preview') }}
|
if: ${{ !contains(github.ref_name, 'preview') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|
@ -77,7 +77,7 @@ jobs:
|
||||||
publish:
|
publish:
|
||||||
if: ${{ !contains(github.ref_name, 'preview') }} # don't publish previews to crabnebula
|
if: ${{ !contains(github.ref_name, 'preview') }} # don't publish previews to crabnebula
|
||||||
needs: [draft-cb-release, build]
|
needs: [draft-cb-release, build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|
|
||||||
37
.github/workflows/build-release-binaries.yml
vendored
37
.github/workflows/build-release-binaries.yml
vendored
|
|
@ -50,11 +50,17 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Build ${{ matrix.bin }} in release mode
|
- name: Build ${{ matrix.bin }} in release mode
|
||||||
run: cargo build --bin ${{ matrix.bin }} --release -vv
|
run: |
|
||||||
|
BIN_PATH=$(
|
||||||
|
cargo build --bin ${{ matrix.bin }} --target ${{ matrix.target }} --release -vv \
|
||||||
|
--message-format=json \
|
||||||
|
| jq -r "select(.reason == \"compiler-artifact\" and .executable != null) | .executable"
|
||||||
|
)
|
||||||
|
echo "BIN_PATH=$BIN_PATH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Smoke test the binary
|
- name: Smoke test the binary
|
||||||
if: matrix.bin != 'orchestrator' # ignore orchestrator, since it's interactive
|
if: matrix.bin != 'orchestrator' # ignore orchestrator, since it's interactive
|
||||||
run: target/${{ matrix.target }}/release/${{ matrix.bin }} --help
|
run: ${{ env.BIN_PATH }} --help
|
||||||
|
|
||||||
- id: create-archive-name
|
- id: create-archive-name
|
||||||
shell: python
|
shell: python
|
||||||
|
|
@ -71,22 +77,17 @@ jobs:
|
||||||
|
|
||||||
print(f'::set-output name=archive::{archive_name}')
|
print(f'::set-output name=archive::{archive_name}')
|
||||||
|
|
||||||
- name: Pack macos archive
|
- name: Pack Linux/Mac binary (tar)
|
||||||
if: contains(matrix.target, 'apple')
|
if: matrix.archive_extension == 'tar'
|
||||||
shell: bash
|
|
||||||
run: gtar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} ${{ matrix.bin }}
|
|
||||||
|
|
||||||
- name: Pack linux archive
|
|
||||||
if: contains(matrix.target, 'linux')
|
|
||||||
shell: bash
|
|
||||||
run: tar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} ${{ matrix.bin }}
|
|
||||||
|
|
||||||
- name: Pack windows archive
|
|
||||||
if: contains(matrix.target, 'windows')
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cp target/${{ matrix.target }}/release/${{ matrix.bin }}.exe ./${{ matrix.bin }}.exe
|
tar -cf ${{ steps.create-archive-name.outputs.archive }} -C $(dirname ${{ env.BIN_PATH }}) $(basename ${{ env.BIN_PATH }})
|
||||||
7z a -tzip ${{ steps.create-archive-name.outputs.archive }} ./${{ matrix.bin }}.exe
|
|
||||||
|
- name: Pack Windows binary (zip)
|
||||||
|
if: matrix.archive_extension == 'zip'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
zip ${{ steps.create-archive-name.outputs.archive }} -j ${{ env.BIN_PATH }}
|
||||||
|
|
||||||
- name: Upload archive
|
- name: Upload archive
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
uses: actions/upload-release-asset@v1.0.2
|
||||||
|
|
@ -100,7 +101,7 @@ jobs:
|
||||||
|
|
||||||
build_and_push_docker:
|
build_and_push_docker:
|
||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
needs: build_binaries
|
needs: build_binaries
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
@ -111,7 +112,7 @@ jobs:
|
||||||
- name: Setup build environment (cli tools, dependencies)
|
- name: Setup build environment (cli tools, dependencies)
|
||||||
uses: ./.github/actions/setup-build-environment
|
uses: ./.github/actions/setup-build-environment
|
||||||
with:
|
with:
|
||||||
host: ubuntu-latest
|
host: ubuntu-22.04
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
|
||||||
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
|
|
@ -12,7 +12,7 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
static_analysis:
|
static_analysis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
- name: Setup build environment (cli tools, dependencies)
|
- name: Setup build environment (cli tools, dependencies)
|
||||||
uses: ./.github/actions/setup-build-environment
|
uses: ./.github/actions/setup-build-environment
|
||||||
with:
|
with:
|
||||||
host: ubuntu-latest
|
host: ubuntu-22.04
|
||||||
|
|
||||||
- name: Run clippy with default features
|
- name: Run clippy with default features
|
||||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||||
|
|
@ -29,14 +29,14 @@ jobs:
|
||||||
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
sqlx_test:
|
sqlx_test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup build environment (cli tools, dependencies)
|
- name: Setup build environment (cli tools, dependencies)
|
||||||
uses: ./.github/actions/setup-build-environment
|
uses: ./.github/actions/setup-build-environment
|
||||||
with:
|
with:
|
||||||
host: ubuntu-latest
|
host: ubuntu-22.04
|
||||||
|
|
||||||
- name: Run sqlx cache setup script
|
- name: Run sqlx cache setup script
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -48,26 +48,26 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
os: ubuntu-latest
|
os: ubuntu-22.04
|
||||||
- target: x86_64-apple-darwin
|
- target: x86_64-apple-darwin
|
||||||
os: macos-13
|
os: macos-13
|
||||||
- target: aarch64-apple-darwin
|
- target: aarch64-apple-darwin
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
- target: x86_64-pc-windows-gnu
|
- target: x86_64-pc-windows-gnu
|
||||||
os: ubuntu-latest
|
os: ubuntu-22.04
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.host }}
|
||||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup build environment (cli tools, dependencies)
|
- name: Setup build environment (cli tools, dependencies)
|
||||||
uses: ./.github/actions/setup-build-environment
|
uses: ./.github/actions/setup-build-environment
|
||||||
with:
|
with:
|
||||||
host: ${{ matrix.os }}
|
host: ${{ matrix.host }}
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
run: cargo build -p swap --target ${{ matrix.target }}
|
run: cargo build -p swap --target ${{ matrix.target }} -vv
|
||||||
|
|
||||||
- name: Upload swap binary
|
- name: Upload swap binary
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
@ -85,18 +85,18 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-22.04, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.host }}
|
||||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup build environment (cli tools, dependencies)
|
- name: Setup build environment (cli tools, dependencies)
|
||||||
uses: ./.github/actions/setup-build-environment
|
uses: ./.github/actions/setup-build-environment
|
||||||
with:
|
with:
|
||||||
host: ${{ matrix.os }}
|
host: ${{ matrix.host }}
|
||||||
|
|
||||||
- name: Run monero-harness tests
|
- name: Run monero-harness tests
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.host == 'ubuntu-22.04'
|
||||||
run: cargo test --package monero-harness --all-features
|
run: cargo test --package monero-harness --all-features
|
||||||
|
|
||||||
- name: Run library tests for swap
|
- name: Run library tests for swap
|
||||||
|
|
@ -146,7 +146,7 @@ jobs:
|
||||||
- package: swap
|
- package: swap
|
||||||
test_name: alice_broken_wallet_rpc_after_started_btc_early_refund
|
test_name: alice_broken_wallet_rpc_after_started_btc_early_refund
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -160,14 +160,14 @@ jobs:
|
||||||
run: cargo test --package ${{ matrix.package }} --test ${{ matrix.test_name }} -- --nocapture
|
run: cargo test --package ${{ matrix.package }} --test ${{ matrix.test_name }} -- --nocapture
|
||||||
|
|
||||||
check_stable:
|
check_stable:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup build environment (cli tools, dependencies)
|
- name: Setup build environment (cli tools, dependencies)
|
||||||
uses: ./.github/actions/setup-build-environment
|
uses: ./.github/actions/setup-build-environment
|
||||||
with:
|
with:
|
||||||
host: ubuntu-latest
|
host: ubuntu-22.04
|
||||||
|
|
||||||
- name: Run cargo check on stable rust
|
- name: Run cargo check on stable rust
|
||||||
run: cargo check --all-targets
|
run: cargo check --all-targets
|
||||||
|
|
|
||||||
2
.github/workflows/create-release.yml
vendored
2
.github/workflows/create-release.yml
vendored
|
|
@ -9,7 +9,7 @@ jobs:
|
||||||
create_release:
|
create_release:
|
||||||
name: Create from merged release branch
|
name: Create from merged release branch
|
||||||
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
|
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.1.7
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/draft-new-release.yml
vendored
2
.github/workflows/draft-new-release.yml
vendored
|
|
@ -10,7 +10,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
draft-new-release:
|
draft-new-release:
|
||||||
name: "Draft a new release"
|
name: "Draft a new release"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.1.7
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
2
.github/workflows/preview-release.yml
vendored
2
.github/workflows/preview-release.yml
vendored
|
|
@ -12,7 +12,7 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
create_release:
|
create_release:
|
||||||
name: Create preview release
|
name: Create preview release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.1.7
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue