Skip to content

Commit

Permalink
Merge branch master into feature/ocean-archive
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouzo committed Nov 27, 2023
2 parents 96ca701 + ab5034e commit f12bdf8
Show file tree
Hide file tree
Showing 62 changed files with 711 additions and 516 deletions.
87 changes: 42 additions & 45 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,74 +25,71 @@ env:
GIT_VERSION: 1

jobs:
linux-x64:
build:
runs-on: ubuntu-latest
container: defi/ain-builder:latest
strategy:
matrix:
target: [x86_64-pc-linux-gnu, x86_64-w64-mingw32, x86_64-apple-darwin]
env:
TARGET: x86_64-pc-linux-gnu
TARGET: ${{matrix.target}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: git config --global --add safe.directory '*'

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

- name: Build and package
run: ./make.sh docker-release
- name: Setup dependencies
run: ./make.sh ci-setup-deps

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

- name: Publish artifact - x86_64-pc-linux-gnu
uses: actions/upload-artifact@v3
- uses: Swatinem/rust-cache@v2
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ env.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Push to Docker Hub
run: |
set -e; ver=${{ env.BUILD_VERSION }}
docker tag defichain-x86_64-pc-linux-gnu:${ver} defi/defichain:${ver}
docker push defi/defichain:${ver}
win-x64:
runs-on: ubuntu-latest
env:
TARGET: x86_64-w64-mingw32

steps:
- uses: actions/checkout@v3

- name: Populate environment
run: ./make.sh ci-export-vars
workspaces: lib -> ../build/lib/target
save-if: ${{ github.ref == 'refs/heads/master' }}

- name: Build and package
run: ./make.sh docker-release
run: ./make.sh release

- name: Publish artifact - x86_64-w64-mingw32
- name: Publish artifact
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.tar.gz
name: defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}
path: ./build/defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}.${{ env.PKG_TYPE }}

osx-x64:
docker-build:
runs-on: ubuntu-latest
needs: [build]
env:
TARGET: x86_64-apple-darwin
TARGET: x86_64-pc-linux-gnu

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: git config --global --add safe.directory '*'

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

- name: Build and package
run: ./make.sh docker-release
- name: Download Binaries
uses: actions/download-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}

- name: Publish artifact - x86_64-apple-darwin
uses: actions/upload-artifact@v3
- name: Build defi image
run: rm .dockerignore && ./make.sh docker-defi-build

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz
username: ${{ env.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Push to Docker Hub
run: |
set -e; ver=${{ env.BUILD_VERSION }}
docker tag defichain-${{ env.TARGET }}:${ver} defi/defichain:${ver}
docker push defi/defichain:${ver}
Loading

0 comments on commit f12bdf8

Please sign in to comment.