Skip to content

Commit

Permalink
fix: dprint
Browse files Browse the repository at this point in the history
  • Loading branch information
lzpap committed Oct 16, 2024
1 parent 23da5a9 commit ce94226
Showing 1 changed file with 54 additions and 54 deletions.
108 changes: 54 additions & 54 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ run-name: Attach IOTA binaries to a ${{ inputs.iota_tag }} release
on:
release:
types: created
# TODO: remove, here only for testing
# TODO: remove, here only for testing
push:
branches:
- 'sc-platform/release-pipeline'
- "sc-platform/release-pipeline"
workflow_dispatch:
inputs:
iota_tag:
description: 'IOTA repo tag to build from'
description: "IOTA repo tag to build from"
type: string
required: true

Expand Down Expand Up @@ -40,7 +40,7 @@ env:
RUSTUP_MAX_RETRIES: 10
# Don't emit giant backtraces in the CI logs.
RUST_BACKTRACE: short
TMP_BUILD_DIR: './tmp/release'
TMP_BUILD_DIR: "./tmp/release"

jobs:
release-build:
Expand All @@ -52,7 +52,7 @@ jobs:
[
self-hosted, # ubuntu-x86_64
windows-latest, # windows-x86_64
macos-latest # macos-arm64
macos-latest, # macos-arm64
]
fail-fast: false
runs-on: ${{ matrix.os }}
Expand All @@ -71,12 +71,12 @@ jobs:
with:
ref: ${{ env.iota_tag }}

# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # pin v4.0.2
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: us-west-2
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # pin v4.0.2
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: us-west-2

- name: Set os/arch variables (Windows)
if: ${{ matrix.os == 'windows-latest' }}
Expand All @@ -94,21 +94,21 @@ jobs:
export arch=$(uname -m)
export system_os=$(echo ${{ matrix.os }} | cut -d- -f1)
export os_type="${system_os}-${arch}"
echo "os_type=${system_os}-${arch}" >> $GITHUB_ENV
echo "os_type=${system_os}-${arch}" >> $GITHUB_ENV
# - name: Check if archive have already been published
# continue-on-error: true
# shell: bash
# run: |
# echo "s3_archive_exist=$(curl -Is https://sui-releases.s3.us-east-1.amazonaws.com/releases/sui-${{ env.iota_tag }}-${{ env.os_type }}.tgz | head -n 1 | grep '200 OK')" >> $GITHUB_ENV
# - name: Check if archive have already been published
# continue-on-error: true
# shell: bash
# run: |
# echo "s3_archive_exist=$(curl -Is https://sui-releases.s3.us-east-1.amazonaws.com/releases/sui-${{ env.iota_tag }}-${{ env.os_type }}.tgz | head -n 1 | grep '200 OK')" >> $GITHUB_ENV

# - name: Download archive, if it exists
# if: ${{ env.s3_archive_exist != '' }}
# shell: bash
# run: |
# mkdir -p ${{ env.TMP_BUILD_DIR }}
# aws s3 cp s3://sui-releases/releases/sui-${{ env.iota_tag }}-${os_type}.tgz ./tmp/sui-${{ env.iota_tag }}-${os_type}.tgz
# tar -xf ./tmp/sui-${{ env.iota_tag }}-${os_type}.tgz -C ${{ env.TMP_BUILD_DIR }}
# - name: Download archive, if it exists
# if: ${{ env.s3_archive_exist != '' }}
# shell: bash
# run: |
# mkdir -p ${{ env.TMP_BUILD_DIR }}
# aws s3 cp s3://sui-releases/releases/sui-${{ env.iota_tag }}-${os_type}.tgz ./tmp/sui-${{ env.iota_tag }}-${os_type}.tgz
# tar -xf ./tmp/sui-${{ env.iota_tag }}-${os_type}.tgz -C ${{ env.TMP_BUILD_DIR }}

- name: Setup caching
uses: bmwill/rust-cache@v1 # Fork of 'Swatinem/rust-cache' which allows caching additional paths
Expand Down Expand Up @@ -139,12 +139,12 @@ jobs:
run: |
brew install postgresql
# NOTE: Self-hosted runners shoudl already have postgres installed
# - name: Install postgres (Ubuntu arm64)
# if: ${{ matrix.os == 'ubuntu-arm64' && env.s3_archive_exist == '' }}
# shell: bash
# run: |
# sudo apt install libpq-dev
# NOTE: Self-hosted runners shoudl already have postgres installed
# - name: Install postgres (Ubuntu arm64)
# if: ${{ matrix.os == 'ubuntu-arm64' && env.s3_archive_exist == '' }}
# shell: bash
# run: |
# sudo apt install libpq-dev

- name: Remove unused apps (MacOS arm64)
if: ${{ matrix.os == 'macos-latest' }}
Expand All @@ -161,7 +161,7 @@ jobs:
- name: Cargo build for ${{ matrix.os }} platform
shell: bash
# currently building in release mode, but we could also have debug builds for testing
# Currently building in release mode, but we could also have debug builds for testing
run: |
[ -f ~/.cargo/env ] && source ~/.cargo/env ; cargo build --release
Expand All @@ -176,30 +176,30 @@ jobs:
mv ./target/release/${binary}${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/${binary}${{ env.extention }}
done
# mv ./target/debug/iota${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/iota-debug${{ env.extention }}
# tar -cvzf ./tmp/iota-${{ env.iota_tag }}-${{ env.os_type }}.tgz -C ${{ env.TMP_BUILD_DIR }} .
# [[ ${{ env.iota_tag }} == *"testnet"* ]] && aws s3 cp ./tmp/iota-${{ env.iota_tag }}-${{ env.os_type }}.tgz s3://iota-releases/releases/iota-${{ env.iota_tag }}-${{ env.os_type }}.tgz || true
# mv ./target/debug/iota${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/iota-debug${{ env.extention }}
# tar -cvzf ./tmp/iota-${{ env.iota_tag }}-${{ env.os_type }}.tgz -C ${{ env.TMP_BUILD_DIR }} .
# [[ ${{ env.iota_tag }} == *"testnet"* ]] && aws s3 cp ./tmp/iota-${{ env.iota_tag }}-${{ env.os_type }}.tgz s3://iota-releases/releases/iota-${{ env.iota_tag }}-${{ env.os_type }}.tgz || true

# - name: Publish Windows iota binary to Chocolatey
# if: ${{ matrix.os == 'windows-latest' && contains(env.iota_tag, 'testnet') }}
# shell: bash
# run: |
# choco install checksum
# export iota_sha=$(checksum -t sha256 ${{ env.TMP_BUILD_DIR }}/iota.exe)
# cd chocolatey
#
# cat <<EOF >>VERIFICATION.txt
# IOTA Binary verification steps
# 1. Download https://github.com/iotaledger/iota/releases/download/${{ env.iota_tag }}/iota-${{ env.iota_tag }}-windows-x86_64.tgz
# 2. Extract iota.exe
# 3. Verify binary: checksum.exe -t sha256 iota.exe: ${iota_sha}
#
# File 'LICENSE.txt' is obtained from: https://github.com/iotaledger/iota/blob/develop/LICENSE
# EOF
#
# choco pack --version ${{ env.iota_version }} configuration=release
# choco apikey --api-key ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/
# choco push iota.${{ env.iota_version }}.nupkg --source https://push.chocolatey.org/
# - name: Publish Windows iota binary to Chocolatey
# if: ${{ matrix.os == 'windows-latest' && contains(env.iota_tag, 'testnet') }}
# shell: bash
# run: |
# choco install checksum
# export iota_sha=$(checksum -t sha256 ${{ env.TMP_BUILD_DIR }}/iota.exe)
# cd chocolatey
#
# cat <<EOF >>VERIFICATION.txt
# IOTA Binary verification steps
# 1. Download https://github.com/iotaledger/iota/releases/download/${{ env.iota_tag }}/iota-${{ env.iota_tag }}-windows-x86_64.tgz
# 2. Extract iota.exe
# 3. Verify binary: checksum.exe -t sha256 iota.exe: ${iota_sha}
#
# File 'LICENSE.txt' is obtained from: https://github.com/iotaledger/iota/blob/develop/LICENSE
# EOF
#
# choco pack --version ${{ env.iota_version }} configuration=release
# choco apikey --api-key ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/
# choco push iota.${{ env.iota_version }}.nupkg --source https://push.chocolatey.org/

- name: Upload release artifacts for ${{ matrix.os }} platform
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # pin@v3
Expand Down

0 comments on commit ce94226

Please sign in to comment.