forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eduardo Leegwater Simões
committed
Oct 13, 2023
1 parent
69747d3
commit 4a26dd5
Showing
1 changed file
with
53 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,53 @@ | ||
# Instructions for GitHub to build Dusk's smart contract compilers. | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: Dusk Contract Compilers | ||
|
||
jobs: | ||
target: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest ] | ||
target: [ | ||
x86_64-unknown-linux-gnu, | ||
x86_64-apple-darwin, | ||
aarch64-apple-darwin, | ||
] | ||
exclude: | ||
- os: ubuntu-latest | ||
target: x86_64-apple-darwin | ||
- os: ubuntu-latest | ||
target: aarch64-apple-darwin | ||
- os: macos-latest | ||
target: x86_64-unknown-linux-gnu | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 4 | ||
|
||
- name: Install dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt update && sudo apt install -y ninja-build | ||
|
||
- name: Install dependencies | ||
if: matrix.os == 'macos-latest' | ||
run: brew install ninja openssl@3 | ||
|
||
- name: Run build | ||
run: ./x build --host ${{ matrix.target }} | ||
|
||
- name: Archive build directory | ||
run: tar -czvf duskc.tar.gz build/${{ matrix.target }}/stage2* | ||
|
||
- name: Upload build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: duskc-${{ matrix.target }}-${{ github.sha }} | ||
path: duskc.zip |