forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (52 loc) · 1.55 KB
/
dusk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# 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 upgrade -y ninja-build
- name: Setup dependencies
if: startsWith(matrix.os, 'macos')
run: brew install ninja
- name: Run build
run: ./x.py dist --host ${{ matrix.target }}
- 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/