Skip to content

chore(CI): archive the contract binaries to GitHub artifacts #17

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

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,13 @@ jobs:
run: make build
- name: Unit Testing
run: make test

- name: Print the size of each binaries and the cumulative size of each directory
if: matrix.os == 'ubuntu-latest'
run: tree -s --du build
- name: Archive the contract binaries ${{ github.sha }}
uses: actions/upload-artifact@v4
with:
name: btc-spv-contract-binaries-${{ matrix.os }}-${{ github.sha }}
Copy link
Contributor

@chaoticlonghair chaoticlonghair Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike the official CKB contracts, SPV contracts are different when build in different environment.

Because:

  • The official CKB contracts are built in dockers.
  • Our contracts could be built with different environment, for example, Rust toolchain.

I think: for production environment, we have to define a build environment.

p.s. Rust 1.77.0 is released on March 21, 2024, but I used 1.76.0 to build contracts for test environment.

Copy link
Contributor Author

@Flouse Flouse Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust 1.77.0 is released on March 21

What about building a docker image with both Rust and LLVM, which could be used in a reproducible workflow?
And this image can be used by rgbpp contracts too.

Reference:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jjyr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about building a docker image with both Rust and LLVM, ...

+1

path: |
build/release