Skip to content

Commit f12bdf8

Browse files
committed
Merge branch master into feature/ocean-archive
2 parents 96ca701 + ab5034e commit f12bdf8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+711
-516
lines changed

.github/workflows/build-dev.yaml

+42-45
Original file line numberDiff line numberDiff line change
@@ -25,74 +25,71 @@ env:
2525
GIT_VERSION: 1
2626

2727
jobs:
28-
linux-x64:
28+
build:
2929
runs-on: ubuntu-latest
30+
container: defi/ain-builder:latest
31+
strategy:
32+
matrix:
33+
target: [x86_64-pc-linux-gnu, x86_64-w64-mingw32, x86_64-apple-darwin]
3034
env:
31-
TARGET: x86_64-pc-linux-gnu
35+
TARGET: ${{matrix.target}}
3236

3337
steps:
34-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
39+
- run: git config --global --add safe.directory '*'
3540

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

39-
- name: Build and package
40-
run: ./make.sh docker-release
44+
- name: Setup dependencies
45+
run: ./make.sh ci-setup-deps
46+
47+
- name: Setup user dependencies
48+
run: ./make.sh ci-setup-user-deps
4149

42-
- name: Publish artifact - x86_64-pc-linux-gnu
43-
uses: actions/upload-artifact@v3
50+
- uses: Swatinem/rust-cache@v2
4451
with:
45-
name: defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu
46-
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz
47-
48-
- name: Login to Docker Hub
49-
uses: docker/login-action@v2
50-
with:
51-
username: ${{ env.DOCKER_HUB_USER }}
52-
password: ${{ secrets.DOCKER_HUB_TOKEN }}
53-
54-
- name: Push to Docker Hub
55-
run: |
56-
set -e; ver=${{ env.BUILD_VERSION }}
57-
docker tag defichain-x86_64-pc-linux-gnu:${ver} defi/defichain:${ver}
58-
docker push defi/defichain:${ver}
59-
60-
win-x64:
61-
runs-on: ubuntu-latest
62-
env:
63-
TARGET: x86_64-w64-mingw32
64-
65-
steps:
66-
- uses: actions/checkout@v3
67-
68-
- name: Populate environment
69-
run: ./make.sh ci-export-vars
52+
workspaces: lib -> ../build/lib/target
53+
save-if: ${{ github.ref == 'refs/heads/master' }}
7054

7155
- name: Build and package
72-
run: ./make.sh docker-release
56+
run: ./make.sh release
7357

74-
- name: Publish artifact - x86_64-w64-mingw32
58+
- name: Publish artifact
7559
uses: actions/upload-artifact@v3
7660
with:
77-
name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32
78-
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.tar.gz
61+
name: defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}
62+
path: ./build/defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}.${{ env.PKG_TYPE }}
7963

80-
osx-x64:
64+
docker-build:
8165
runs-on: ubuntu-latest
66+
needs: [build]
8267
env:
83-
TARGET: x86_64-apple-darwin
68+
TARGET: x86_64-pc-linux-gnu
8469

8570
steps:
86-
- uses: actions/checkout@v3
71+
- uses: actions/checkout@v4
72+
- run: git config --global --add safe.directory '*'
8773

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

91-
- name: Build and package
92-
run: ./make.sh docker-release
77+
- name: Download Binaries
78+
uses: actions/download-artifact@v3
79+
with:
80+
name: defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}
9381

94-
- name: Publish artifact - x86_64-apple-darwin
95-
uses: actions/upload-artifact@v3
82+
- name: Build defi image
83+
run: rm .dockerignore && ./make.sh docker-defi-build
84+
85+
- name: Login to Docker Hub
86+
uses: docker/login-action@v2
9687
with:
97-
name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin
98-
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz
88+
username: ${{ env.DOCKER_HUB_USER }}
89+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
90+
91+
- name: Push to Docker Hub
92+
run: |
93+
set -e; ver=${{ env.BUILD_VERSION }}
94+
docker tag defichain-${{ env.TARGET }}:${ver} defi/defichain:${ver}
95+
docker push defi/defichain:${ver}

0 commit comments

Comments
 (0)