Skip to content

Commit d96dc73

Browse files
committed
Initial release
0 parents  commit d96dc73

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

.github/workflows/anchor.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Anchor
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
releaseVersion:
6+
description: GitHub Release Version
7+
required: true
8+
type: string
9+
anchorVersion:
10+
description: Anchor Version
11+
required: false
12+
type: string
13+
default: 0.25.0
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
steps:
19+
# needed for doing releases
20+
- uses: actions/checkout@v3
21+
# setup rust
22+
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
23+
shell: bash
24+
- run: echo "/home/runner/.cargo/bin" >> $GITHUB_PATH
25+
shell: bash
26+
- uses: actions/cache@v3
27+
with:
28+
path: |
29+
~/.cargo/bin/
30+
~/.cargo/registry/index/
31+
~/.cargo/registry/cache/
32+
~/.cargo/git/db/
33+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
34+
35+
# build anchor
36+
- run: |
37+
sudo apt-get install -y pkg-config build-essential libudev-dev libssl-dev
38+
cargo install anchor-cli --version ${{ inputs.anchorVersion }} --locked --force
39+
# prepare & upload
40+
- run: |
41+
tar -czf anchor.tar.gz ~/.cargo/bin/anchor
42+
md5sum ~/.cargo/bin/anchor > anchor.md5
43+
md5sum anchor.tar.gz > anchor.tar.gz.md5
44+
gh release create ${{ inputs.releaseVersion }} \
45+
--title anchor-${{ inputs.anchorVersion }} \
46+
~/.cargo/bin/anchor \
47+
anchor.tar.gz \
48+
anchor.md5 \
49+
anchor.tar.gz.md5
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Anchor Binaries
2+
===
3+
4+
If you have been using [`@project-serum/anchor-cli`](https://www.npmjs.com/package/@project-serum/anchor-cli) in your CI/CD pipelines, it is [broken](https://github.com/coral-xyz/anchor/issues/2076) for Anchor 0.25.0. A few months on and no fix or new version is forthcoming. Building the binary in the pipeline also takes too long.
5+
6+
This repository provides the Linux binary as a GitHub release for others to use.
7+
8+
Please check the GitHub Action to verify authencity of the binary, built from [`anchor-cli`](https://crates.io/crates/anchor-cli) Rust crate.

0 commit comments

Comments
 (0)