forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The compiler is built for the following hosts: - x86_64-unknown-linux-gnu - x86_64-apple-darwin - aarch64-apple-darwin And produces code for the following targets: - The host triple - wasm32-unknown-unknown - wasm64-unknown-unknown
- Loading branch information
Eduardo Leegwater Simões
committed
Oct 17, 2024
1 parent
826db24
commit cd2c28f
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 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 | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt update && sudo apt install -y ninja-build | ||
|
||
- name: Setup dependencies | ||
if: startsWith(matrix.os, 'macos') | ||
run: | | ||
brew install ninja gettext && | ||
brew link --force gettext | ||
- name: Generate configuration | ||
run: | | ||
HOST=${{ matrix.target }} envsubst < config.template.toml > config.toml && | ||
cat config.toml | ||
- name: Run build | ||
run: ./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/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
change-id = 131075 | ||
|
||
[llvm] | ||
download-ci-llvm = false | ||
|
||
[build] | ||
host = [ "${HOST}" ] | ||
target = [ | ||
"${HOST}", | ||
"wasm32-unknown-unknown", | ||
"wasm64-unknown-unknown" | ||
] | ||
docs = false | ||
extended = true | ||
|
||
[rust] | ||
channel = "nightly" | ||
description = "Dusk Network's Smart Contract Compiler" | ||
|
||
lld = true | ||
|
||
[dist] | ||
compression-formats = ["gz"] | ||
compression-profile = "best" |