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

refactor!: remove gg20 support #330

Merged
merged 9 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
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
6 changes: 3 additions & 3 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ 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
components: rustfmt

- name: Run cargo fmt
uses: actions-rs/cargo@v1
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
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ 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

- name: Run cargo test
run: cargo test --release --all-features
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tofnd"
version = "0.10.2"
version = "0.11.0"
authors = ["Gus Gutoski <gus@axelar.network>", "Stelios Daveas <stelios@axelar.network>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -63,5 +63,3 @@ panic = "unwind"
panic = "unwind"

[features]
# when we compile tofnd with malicious build, also use malicious build for tofn
malicious = ["tofn/malicious"]
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ COPY ./entrypoint.sh /

VOLUME [ "/.tofnd" ]

ENV UNSAFE ""
ENV MNEMONIC_CMD ""
ENV NOPASSWORD ""
ENV TOFND_HOME ""
Expand Down
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
docker-image: git-submodule-setup
@DOCKER_BUILDKIT=1 docker build --ssh default -t axelar/tofnd .

.PHONY: docker-image-malicious
docker-image-malicious: git-submodule-setup
@DOCKER_BUILDKIT=1 docker build --ssh default --build-arg features="malicious" -t axelar/tofnd-malicious .


.PHONY: copy-binary
copy-binary-from-image: guard-SEMVER
./scripts/copy-binaries-from-image.sh
Expand All @@ -20,12 +15,11 @@ upload-binaries-to-s3: guard-S3_PATH
.PHONY: docker-image-all
docker-image-all: git-submodule-setup
make docker-image
make docker-image-malicious

.PHONY: git-submodule-setup
git-submodule-setup:
git submodule init
git submodule update

guard-%:
@ if [ -z '${${*}}' ]; then echo 'Environment variable $* not set' && exit 1; fi
@ if [ -z '${${*}}' ]; then echo 'Environment variable $* not set' && exit 1; fi
Loading
Loading