Skip to content

Commit

Permalink
clean pin rust version and clean up actions
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Jul 5, 2024
1 parent 86c0105 commit 48833e6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 31 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/build-docker-image-and-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,39 @@ jobs:
aws s3 ls s3://axelar-releases/tofnd/"$SEMVER" && echo "tag already exists, use a new one" && exit 1
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: '0'
ref: ${{ github.event.inputs.tag }}
submodules: recursive

- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.78.0
override: true
components: rustfmt, clippy

- name: build darwin binaries
- name: Build Mac OS binaries
env:
SEMVER: ${{ github.event.inputs.tag }}
if: matrix.os == 'macos-latest'
run: |
OS="darwin"
ARCH="${{ matrix.arch }}"
mkdir tofndbin
if [ "$ARCH" == "arm64" ]
then
./install-gmp-arm64.sh
rustup target add aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin
mkdir tofndbin
cargo build --release --locked --target aarch64-apple-darwin
mv /Users/runner/work/tofnd/tofnd/target/aarch64-apple-darwin/release/tofnd "./tofndbin/tofnd-$OS-$ARCH-$SEMVER"
else
cargo install --locked --path .
mkdir tofndbin
mv "/Users/runner/work/tofnd/tofnd/target/release/tofnd" "./tofndbin/tofnd-$OS-$ARCH-$SEMVER"
fi
- name: build linux binaries
- name: Build Linux binaries
env:
SEMVER: ${{ github.event.inputs.tag }}
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -147,7 +149,7 @@ jobs:
steps:

- name: Checkout code for docker image build
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: '0'
ref: ${{ github.event.inputs.tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-latest-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code and submodule
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.78.0
override: true
components: rustfmt, clippy

Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,18 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code and submodule
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.78.0
override: true
components: rustfmt, clippy

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings

- name: Run cargo clippy with all features
uses: actions-rs/cargo@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.0.1
uses: actions/checkout@v4
with:
fetch-depth: '0'
submodules: recursive
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code and submodule
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.78.0
override: true

- name: Run cargo test
Expand Down
6 changes: 0 additions & 6 deletions install-gmp-arm64.sh

This file was deleted.

0 comments on commit 48833e6

Please sign in to comment.