Skip to content

Build - Staging

Build - Staging #49

Workflow file for this run

name: Build - Staging
on:
workflow_dispatch:
env:
MAKE_DEBUG: 0
GIT_VERSION: 1
jobs:
# We keep the flow as similar as close to release flow as possible
# to validate change before it gets into release, even though
# these don't create end artifacts to use
stage-release:
runs-on: ubuntu-latest
container: defi/ain-builder:latest
strategy:
matrix:
target: [x86_64-pc-linux-gnu, aarch64-linux-gnu, x86_64-w64-mingw32, x86_64-apple-darwin, aarch64-apple-darwin]
env:
TARGET: ${{matrix.target}}
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory '*'
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Setup dependencies
run: ./make.sh ci-setup-deps
- name: Setup user dependencies
run: ./make.sh ci-setup-user-deps
- uses: Swatinem/rust-cache@v2
with:
workspaces: lib -> ../build/lib/target
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Build and package
run: ./make.sh release
- name: Publish artifact
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}
path: |
./build/defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}.${{ env.PKG_TYPE }}
./build/defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}.${{ env.PKG_TYPE }}.SHA256
stage-docker-release:
runs-on: ubuntu-latest
needs: [stage-release]
env:
TARGET: x86_64-pc-linux-gnu
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory '*'
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Download Binaries
uses: actions/download-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-${{ env.TARGET }}
- name: Build defi image
run: rm .dockerignore && ./make.sh docker-defi-build