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

Further build refinements, use ain-builder, rust 1.70 #2054

Merged
merged 26 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ff89e58
Switch builder to ain-builder, rust to 1.70
prasannavl Jun 12, 2023
11180cc
Cleanup workfflow, enable more release builds
prasannavl Jun 12, 2023
ede3756
Fix tests, use apt-get in automation
prasannavl Jun 12, 2023
320e9d5
Add PATH export to ci-vars
prasannavl Jun 13, 2023
505f592
Use ci-vars, cleanup
prasannavl Jun 13, 2023
3074263
Remove repeated export
prasannavl Jun 13, 2023
b998189
Just install native deps
prasannavl Jun 13, 2023
43c8c3d
Update sync tests to the latest workflow
prasannavl Jun 13, 2023
3e24dc8
Fix docker arg naming
sieniven Jun 13, 2023
b0e5aa9
Fix dockerfiles
sieniven Jun 13, 2023
1d12ba5
Build arg fixes
prasannavl Jun 13, 2023
24ceeff
Merge branch 'master' into pvl/ain-builder
prasannavl Jun 13, 2023
b7877d5
Fix tests-e2e workflow to export ci var, add debug logs
sieniven Jun 13, 2023
b842d77
Merge branch 'pvl/ain-builder' of github.com:DeFiCh/ain into pvl/ain-…
sieniven Jun 13, 2023
451e6fc
Add debug log
sieniven Jun 13, 2023
1d1e31e
Debug logs
sieniven Jun 13, 2023
7a18fc5
Fix debug log
sieniven Jun 13, 2023
d097834
Debug ci
sieniven Jun 13, 2023
fed16ed
sudo permissons
sieniven Jun 13, 2023
7948050
Change cargo dir to root
sieniven Jun 13, 2023
c98a904
Run set up separately
sieniven Jun 13, 2023
69a8c88
Fix rustup command not found bug
sieniven Jun 13, 2023
8a8185c
Fix test-sync
sieniven Jun 13, 2023
1e75088
Remove sudo privileges
sieniven Jun 13, 2023
2db3324
Refactor setup target dependency
sieniven Jun 13, 2023
47e07c4
Add comments, minor changes
prasannavl Jun 13, 2023
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
3 changes: 3 additions & 0 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
env:
BUILD_VERSION: latest # Computed
DOCKER_HUB_USER: defi
# Note: We use debug build on CI for dev as well, since debug builds take
# 5x the amount of space and run the GitHub CI workers out of space. make.sh
# still defaults to debug for local builds
MAKE_DEBUG: 0

jobs:
Expand Down
232 changes: 116 additions & 116 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ jobs:
create-release:
needs:
- linux-x64
# - linux-armhf
# - linux-aarch64
# - win-x64
# - osx-x64
# - osx-aarch64
- linux-armhf
- linux-aarch64
- win-x64
- osx-x64
- osx-aarch64
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')

Expand All @@ -162,12 +162,12 @@ jobs:
- name: Get artifacts
uses: actions/download-artifact@v3

# - name: zip package for win-x64
# run: |
# set -e; ver=${{ env.BUILD_VERSION }}
# cd defichain-${ver}-x86_64-w64-mingw32
# tar xzf defichain-${ver}-x86_64-w64-mingw32.tar.gz
# zip -r "defichain-${ver}-x86_64-w64-mingw32.zip" defichain-${ver}/
- name: zip package for win-x64
run: |
set -e; ver=${{ env.BUILD_VERSION }}
cd defichain-${ver}-x86_64-w64-mingw32
tar xzf defichain-${ver}-x86_64-w64-mingw32.tar.gz
zip -r "defichain-${ver}-x86_64-w64-mingw32.zip" defichain-${ver}/

- name: Get release
id: get_release
Expand All @@ -180,16 +180,16 @@ jobs:
set -e; ver=${{ env.BUILD_VERSION }}
cd ./defichain-${ver}-x86_64-pc-linux-gnu
sha256sum ./defichain-${ver}-x86_64-pc-linux-gnu.tar.gz > ./defichain-${ver}-x86_64-pc-linux-gnu.tar.gz.SHA256
# cd ./defichain-${ver}-arm-linux-gnueabihf
# sha256sum ./defichain-${ver}-arm-linux-gnueabihf.tar.gz > ./defichain-${ver}-arm-linux-gnueabihf.tar.gz.SHA256
# cd ./defichain-${ver}-aarch64-linux-gnu
# sha256sum ./defichain-${ver}-aarch64-linux-gnu.tar.gz > ./defichain-${ver}-aarch64-linux-gnu.tar.gz.SHA256
# cd .. && cd ./defichain-${ver}-x86_64-w64-mingw32
# sha256sum ./defichain-${ver}-x86_64-w64-mingw32.zip > ./defichain-${ver}-x86_64-w64-mingw32.zip.SHA256
# cd .. && cd ./defichain-${ver}-x86_64-apple-darwin
# sha256sum ./defichain-${ver}-x86_64-apple-darwin.tar.gz > ././defichain-${ver}-x86_64-apple-darwin.tar.gz.SHA256
# cd .. && cd ./defichain-${ver}-aarch64-apple-darwin
# sha256sum ./defichain-${ver}-aarch64-apple-darwin.tar.gz > ././defichain-${ver}-aarch64-apple-darwin.tar.gz.SHA256
cd ./defichain-${ver}-arm-linux-gnueabihf
sha256sum ./defichain-${ver}-arm-linux-gnueabihf.tar.gz > ./defichain-${ver}-arm-linux-gnueabihf.tar.gz.SHA256
cd ./defichain-${ver}-aarch64-linux-gnu
sha256sum ./defichain-${ver}-aarch64-linux-gnu.tar.gz > ./defichain-${ver}-aarch64-linux-gnu.tar.gz.SHA256
cd .. && cd ./defichain-${ver}-x86_64-w64-mingw32
sha256sum ./defichain-${ver}-x86_64-w64-mingw32.zip > ./defichain-${ver}-x86_64-w64-mingw32.zip.SHA256
cd .. && cd ./defichain-${ver}-x86_64-apple-darwin
sha256sum ./defichain-${ver}-x86_64-apple-darwin.tar.gz > ././defichain-${ver}-x86_64-apple-darwin.tar.gz.SHA256
cd .. && cd ./defichain-${ver}-aarch64-apple-darwin
sha256sum ./defichain-${ver}-aarch64-apple-darwin.tar.gz > ././defichain-${ver}-aarch64-apple-darwin.tar.gz.SHA256

- name: Upload release asset - linux-x64
uses: actions/upload-release-asset@v1
Expand All @@ -211,102 +211,102 @@ jobs:
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz.SHA256
asset_content_type: text/plain

# - name: Upload release asset - linux-armhf
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf/defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz
# asset_name: defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz
# asset_content_type: application/gzip
- name: Upload release asset - linux-armhf
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf/defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz
asset_content_type: application/gzip

# - name: Upload checksum - linux-armhf
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf/defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz.SHA256
# asset_name: defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz.SHA256
# asset_content_type: text/plain
- name: Upload checksum - linux-armhf
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf/defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-arm-linux-gnueabihf.tar.gz.SHA256
asset_content_type: text/plain

# - name: Upload release asset - linux-aarch64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu/defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz
# asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz
# asset_content_type: application/gzip
- name: Upload release asset - linux-aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu/defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz
asset_content_type: application/gzip

# - name: Upload checksum - linux-aarch64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu/defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz.SHA256
# asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz.SHA256
# asset_content_type: text/plain

# - name: Upload release asset - win-x64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip
# asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip
# asset_content_type: application/zip

# - name: Upload checksum asset - win-x64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip.SHA256
# asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip.SHA256
# asset_content_type: text/plain

# - name: Upload release asset - osx-x64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz
# asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz
# asset_content_type: application/gzip

# - name: Upload checksum asset - osx-x64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz.SHA256
# asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz.SHA256
# asset_content_type: text/plain
- name: Upload checksum - linux-aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu/defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-linux-gnu.tar.gz.SHA256
asset_content_type: text/plain

- name: Upload release asset - win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip
asset_content_type: application/zip

- name: Upload checksum asset - win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip.SHA256
asset_content_type: text/plain

- name: Upload release asset - osx-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz
asset_content_type: application/gzip

- name: Upload checksum asset - osx-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz.SHA256
asset_content_type: text/plain

# - name: Upload release asset - osx-aarch64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz
# asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz
# asset_content_type: application/gzip

# - name: Upload checksum asset - osx-aarch64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release.outputs.upload_url }}
# asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz.SHA256
# asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz.SHA256
# asset_content_type: text/plain
- name: Upload release asset - osx-aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz
asset_content_type: application/gzip

- name: Upload checksum asset - osx-aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin/defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-aarch64-apple-darwin.tar.gz.SHA256
asset_content_type: text/plain
9 changes: 9 additions & 0 deletions .github/workflows/tests-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Populate environment
run: ./make.sh ci-export-vars

- name: Install dependencies
run: sudo ./make.sh ci-setup-deps

- name: Setup target
run: ./make.sh ci-setup-deps-target

- name: Tests
run: ./ci/test/main.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Tests - EVM
name: Tests - DeFiCh/go-ethlibs

on:
workflow_dispatch:
pull_request:
branches:
- feature/evm
push:
branches:
- feature/evm
tags:
- evm
- master
pull_request:
branches:
- master

env:
NODE_URL: "http://127.0.0.1:19551/"
Expand All @@ -20,11 +18,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Populate environment
run: ./make.sh ci-export-vars

- name: Install dependencies
run: sudo ./make.sh pkg-install-deps && sudo ./make.sh pkg-install-llvm
run: sudo ./make.sh ci-setup-deps

- name: Setup target
run: ./make.sh ci-setup-deps-target

- name: Build binaries
run: TARGET="x86_64-pc-linux-gnu" ./make.sh build
run: ./make.sh build

- name: Upload binaries
uses: actions/upload-artifact@v3
Expand All @@ -33,7 +37,7 @@ jobs:
path: |
build/src/defid
build/src/defi-cli
.github/scripts/fixtures.sh
ci/test/ethlibs-fixtures.sh

node-rpc-tests:
runs-on: ubuntu-latest
Expand All @@ -46,7 +50,7 @@ jobs:

- name: Chores
run: |
chmod uog+x build/src/defid build/src/defi-cli .github/scripts/fixtures.sh
chmod uog+x build/src/defid build/src/defi-cli ci/test/ethlibs-fixtures.sh

- name: Run defid node
run: |
Expand All @@ -55,7 +59,7 @@ jobs:
- name: Push fixtures
run: |
sleep 5
./.github/scripts/fixtures.sh
./ci/test/ethlibs-fixtures.sh

- name: Set up Go
uses: actions/setup-go@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-jellyfish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests - Jellyfish
name: Tests - JellyfishSDK

on:
workflow_dispatch:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/tests-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,27 @@ jobs:
with:
fetch-depth: 0

- name: Build node
- name: Populate environment
run: ./make.sh ci-export-vars

- name: Install dependencies
run: sudo ./make.sh ci-setup-deps

- name: Setup target
run: ./make.sh ci-setup-deps-target

# TODO: Switch this to a docker build later and this builds on the native
# VM toolchain and loses disparity with the CI release builds
run: TARGET="x86_64-pc-linux-gnu" ./make.sh build
- name: Build binaries
run: ./make.sh build

- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: defibins
path: |
build/x86_64-pc-linux-gnu/src/defid
build/x86_64-pc-linux-gnu/src/defi-cli
build/src/defid
build/src/defi-cli

- name: Upload shell commands
uses: actions/upload-artifact@v3
Expand Down
File renamed without changes.
Loading