Release 0.3.0
#99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instructions for GitHub to build Dusk's smart contract compilers. | |
on: | |
pull_request: | |
push: | |
tags: | |
- "v*.*.*" | |
branches: | |
- master | |
name: Dusk Contract Compilers | |
jobs: | |
target: | |
strategy: | |
matrix: | |
target: [ | |
x86_64-unknown-linux-gnu, | |
x86_64-apple-darwin, | |
aarch64-apple-darwin, | |
] | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os: macos-latest-large | |
target: x86_64-apple-darwin | |
- os: macos-latest-xlarge | |
target: aarch64-apple-darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 16 | |
- name: Setup dependencies (x86_64-linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt update && \ | |
sudo apt install -y ninja-build && \ | |
touch .env | |
- name: Setup dependencies (x86_64-apple) | |
if: startsWith(matrix.target, 'x86_64-apple') | |
run: | | |
brew install ninja llvm lld && | |
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> .env && | |
echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> .env && | |
echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> .env | |
- name: Setup dependencies (aarch64-apple) | |
if: startsWith(matrix.target, 'aarch64-apple') | |
run: | | |
brew install ninja llvm lld && | |
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> .env && | |
echo 'export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"' >> .env && | |
echo 'export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"' >> .env | |
- name: Generate configuration | |
run: | | |
HOST=${{ matrix.target }} envsubst < config.template.toml > config.toml && | |
cat config.toml | |
- name: Run build | |
run: source .env && ./x.py dist | |
- name: Set artifact name | |
id: artifact-name | |
run: | | |
if [ "${{ github.ref_type }}" == "tag" ]; then | |
echo "name=duskc-${{ matrix.target }}-${{ github.ref_name }}" >> "$GITHUB_OUTPUT" | |
else | |
echo "name=duskc-${{ matrix.target }}-${{ github.sha }}" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.artifact-name.outputs.name }} | |
path: build/dist/ |