-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from metaDAOproject/develop
Prop 15
- Loading branch information
Showing
37 changed files
with
7,253 additions
and
2,230 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Docker image to generate deterministic, verifiable builds of Anchor programs. | ||
# This must be run *after* a given ANCHOR_CLI version is published and a git tag | ||
# is released on GitHub. | ||
# | ||
|
||
FROM ubuntu:22.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
ARG SOLANA_CLI="1.17.16" | ||
ARG ANCHOR_CLI="0.29.0" | ||
ARG NODE_VERSION="v18.16.0" | ||
|
||
ENV HOME="/root" | ||
ENV PATH="${HOME}/.cargo/bin:${PATH}" | ||
ENV PATH="${HOME}/.local/share/solana/install/active_release/bin:${PATH}" | ||
ENV PATH="${HOME}/.nvm/versions/node/${NODE_VERSION}/bin:${PATH}" | ||
|
||
# Install base utilities. | ||
RUN mkdir -p /workdir && mkdir -p /tmp && \ | ||
apt-get update -qq && apt-get upgrade -qq && apt-get install -qq \ | ||
build-essential git curl wget jq pkg-config python3-pip \ | ||
libssl-dev libudev-dev | ||
|
||
#RUN wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb | ||
#RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb | ||
|
||
# Install rust. | ||
RUN curl "https://sh.rustup.rs" -sfo rustup.sh && \ | ||
sh rustup.sh -y && \ | ||
rustup component add rustfmt clippy | ||
|
||
# Install node / npm / yarn. | ||
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | ||
ENV NVM_DIR="${HOME}/.nvm" | ||
RUN . $NVM_DIR/nvm.sh && \ | ||
nvm install ${NODE_VERSION} && \ | ||
nvm use ${NODE_VERSION} && \ | ||
nvm alias default node && \ | ||
npm install -g yarn | ||
|
||
# Install Solana tools. | ||
RUN sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_CLI}/install)" | ||
|
||
# Install anchor. | ||
RUN cargo install --git https://github.com/coral-xyz/anchor avm --locked --force | ||
RUN avm install ${ANCHOR_CLI} && avm use ${ANCHOR_CLI} | ||
|
||
# set up keypair | ||
RUN solana-keygen new --no-bip39-passphrase | ||
|
||
WORKDIR /workdir | ||
#be sure to add `/root/.avm/bin` to your PATH to be able to run the installed binaries | ||
|
||
# install dependencies | ||
RUN yarn |
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,3 @@ | ||
{ | ||
"build": { "dockerfile": "Dockerfile" }, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: generate-verifiable-builds | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- production | ||
- develop | ||
|
||
jobs: | ||
generate-verifiable-autocrat: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: metadaoproject/anchor-verifiable-build@v0 | ||
with: | ||
program: autocrat_v0 | ||
anchor-version: '0.29.0' | ||
solana-cli-version: '1.17.16' | ||
- run: 'git pull --rebase' | ||
- run: cp target/deploy/autocrat_v0.so ./verifiable-builds | ||
- name: Commit verifiable build back to mainline | ||
uses: EndBug/add-and-commit@v9.1.4 | ||
with: | ||
default_author: github_actions | ||
message: 'Update autocrat_v0 verifiable build' | ||
generate-verifiable-vault: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: metadaoproject/anchor-verifiable-build@v0 | ||
with: | ||
program: conditional_vault | ||
anchor-version: '0.29.0' | ||
solana-cli-version: '1.17.16' | ||
- run: 'git pull --rebase' | ||
- run: cp target/deploy/conditional_vault.so ./verifiable-builds | ||
- name: Commit verifiable build back to mainline | ||
uses: EndBug/add-and-commit@v9.1.4 | ||
with: | ||
default_author: github_actions | ||
message: 'Update conditional_vault verifiable build' | ||
generate-verifiable-migrator: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: metadaoproject/anchor-verifiable-build@v0 | ||
with: | ||
program: autocrat_migrator | ||
anchor-version: '0.29.0' | ||
solana-cli-version: '1.17.16' | ||
- run: 'git pull --rebase' | ||
- run: cp target/deploy/autocrat_migrator.so ./verifiable-builds | ||
- name: Commit verifiable build back to mainline | ||
uses: EndBug/add-and-commit@v9.1.4 | ||
with: | ||
default_author: github_actions | ||
message: 'Update autocrat_migrator verifiable build' |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.