-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into shady/multi-token-support
- Loading branch information
Showing
5 changed files
with
201 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,22 @@ on: | |
|
||
jobs: | ||
build: | ||
name: Publish Manual Seal Binary | ||
runs-on: ubuntu-20.04 | ||
name: Publish Manual Seal Binary (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-latest] | ||
concurrency: | ||
group: manual-seal-${{ github.ref }} | ||
group: manual-seal-${{ github.ref }}-${{ matrix.os }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./.github/actions/free-disk-space | ||
- name: Free Disk Space (Ubuntu) | ||
if: matrix.os == 'ubuntu-20.04' | ||
uses: ./.github/actions/free-disk-space | ||
|
||
- name: Install toolchain | ||
id: toolchain | ||
uses: actions-rs/toolchain@master | ||
|
@@ -28,29 +34,39 @@ jobs: | |
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: Install Protobuf | ||
- name: Install Protobuf (Ubuntu) | ||
if: matrix.os == 'ubuntu-20.04' | ||
run: sudo apt-get install protobuf-compiler | ||
|
||
- name: Install Protobuf (macOS) | ||
if: matrix.os == 'macos-latest' | ||
run: brew install protobuf | ||
|
||
- name: Build binary | ||
run: cargo build --release -p tangle --locked --features testnet,txpool,manual-seal | ||
|
||
- name: Calculate SHA256 | ||
run: sha256sum target/release/tangle > target/release/tangle.sha256sum | ||
run: | | ||
if [ "${{ matrix.os }}" == "macos-latest" ]; then | ||
shasum -a 256 target/release/tangle > target/release/tangle.sha256sum | ||
else | ||
sha256sum target/release/tangle > target/release/tangle.sha256sum | ||
fi | ||
- name: Upload manual-seal binary to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/release/tangle | ||
asset_name: tangle-testnet-manual-seal-linux-amd64 | ||
asset_name: tangle-testnet-manual-seal-${{ matrix.os == 'macos-latest' && 'darwin' || 'linux' }}-amd64 | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
|
||
- name: Uplaod SHA256 of the binary | ||
- name: Upload SHA256 of the binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/release/tangle.sha256sum | ||
asset_name: tangle-testnet-manual-seal-linux-amd64.sha256sum | ||
asset_name: tangle-testnet-manual-seal-${{ matrix.os == 'macos-latest' && 'darwin' || 'linux' }}-amd64.sha256sum | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,23 @@ on: | |
|
||
jobs: | ||
build: | ||
name: Publish binaries | ||
runs-on: ubuntu-20.04 | ||
name: Publish binaries (${{ matrix.os }}, ${{ matrix.features }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-latest] | ||
features: [testnet, default, txpool] | ||
concurrency: | ||
group: release-${{ github.ref }}-${{ matrix.os }}-${{ matrix.features }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./.github/actions/free-disk-space | ||
- name: Free Disk Space (Ubuntu) | ||
if: matrix.os == 'ubuntu-20.04' | ||
uses: ./.github/actions/free-disk-space | ||
|
||
- name: Install toolchain | ||
id: toolchain | ||
uses: actions-rs/toolchain@master | ||
|
@@ -28,29 +35,39 @@ jobs: | |
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: Install Protobuf | ||
- name: Install Protobuf (Ubuntu) | ||
if: matrix.os == 'ubuntu-20.04' | ||
run: sudo apt-get install protobuf-compiler | ||
|
||
- name: Install Protobuf (macOS) | ||
if: matrix.os == 'macos-latest' | ||
run: brew install protobuf | ||
|
||
- name: Build binary | ||
run: cargo build --release -p tangle --locked --features ${{ matrix.features }} | ||
|
||
- name: Calculate SHA256 | ||
run: sha256sum target/release/tangle > target/release/tangle.sha256sum | ||
run: | | ||
if [ "${{ matrix.os }}" == "macos-latest" ]; then | ||
shasum -a 256 target/release/tangle > target/release/tangle.sha256sum | ||
else | ||
sha256sum target/release/tangle > target/release/tangle.sha256sum | ||
fi | ||
- name: Upload ${{ matrix.features }} binary to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/release/tangle | ||
asset_name: tangle-${{ matrix.features }}-linux-amd64 | ||
asset_name: tangle-${{ matrix.features }}-${{ matrix.os == 'macos-latest' && 'darwin' || 'linux' }}-amd64 | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
|
||
- name: Uplaod SHA256 of the binary | ||
- name: Upload SHA256 of the binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/release/tangle.sha256sum | ||
asset_name: tangle-${{ matrix.features }}-linux-amd64.sha256sum | ||
asset_name: tangle-${{ matrix.features }}-${{ matrix.os == 'macos-latest' && 'darwin' || 'linux' }}-amd64.sha256sum | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters