forked from celo-org/celo-threshold-bls-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
88 additions
and
120 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
tags: | ||
- '*.*.*' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
build: | ||
name: Build and push docker images | ||
runs-on: ubuntu-latest | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
DOCKER_REGISTRY: ghcr.io | ||
DOCKER_IMAGE_BASE: ${{ github.repository_owner }} | ||
outputs: | ||
operator: ${{ steps.meta-tezos-operator.outputs.tags }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to the registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.DOCKER_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set image tags & labels | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/dkg-cli | ||
|
||
- name: Image build & push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: crates/dkg-cli/Dockerfile | ||
push: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
test: | ||
name: Check formatting and run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.76 | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Run tests | ||
run: cargo test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
FROM cimg/rust:1.65.0 | ||
FROM rust:1.76.0 | ||
|
||
ENV HOME=/home/circleci | ||
ENV HOME=/root | ||
ENV PATH=$HOME/bin:$PATH | ||
|
||
RUN cd $HOME && git clone https://github.com/m-kus/threshold-bls-rs | ||
RUN mkdir $HOME/bin && wget -q https://github.com/ethereum/solidity/releases/download/v0.6.6/solc-static-linux -O $HOME/bin/solc && chmod u+x $HOME/bin/solc && solc --version | ||
RUN cd $HOME && cd threshold-bls-rs/crates/dkg-cli && RUSTFLAGS="-C target-feature=-crt-static" cargo build --release | ||
RUN cd $HOME && git clone https://github.com/trilitech/dkg-tooling | ||
RUN mkdir $HOME/bin && wget -q https://github.com/ethereum/solidity/releases/download/v0.8.25/solc-static-linux -O $HOME/bin/solc && chmod u+x $HOME/bin/solc && solc --version | ||
RUN cd $HOME && cd dkg-tooling/crates/dkg-cli && RUSTFLAGS="-C target-feature=-crt-static" cargo build --release | ||
|
||
FROM ubuntu:22.04 | ||
COPY --from=0 /home/circleci/threshold-bls-rs/target/release/dkg-cli /dkgbin | ||
WORKDIR /dkg | ||
ENTRYPOINT [ "/dkgbin" ] | ||
COPY --from=0 /root/dkg-tooling/target/release/dkg-cli /usr/bin/ | ||
ENTRYPOINT [ "dkg-cli" ] |
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