-
Notifications
You must be signed in to change notification settings - Fork 197
62 lines (57 loc) · 1.63 KB
/
build.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
61
62
name: Build
on:
push:
tags:
pull_request:
branches:
- main
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
name: Build wit-bindgen
runs-on: ${{ matrix.os }}
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/wit-bindgen-cli-')
strategy:
matrix:
include:
- build: x86_64-linux
os: ubuntu-latest
- build: x86_64-macos
os: macos-latest
- build: aarch64-macos
os: macos-latest
target: aarch64-apple-darwin
- build: x86_64-windows
os: windows-latest
- build: aarch64-linux
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: rustup update stable --no-self-update && rustup default stable
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
with:
name: ${{ matrix.build }}
- run: |
echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV
rustup target add ${{ matrix.target }}
if: matrix.target != ''
- run: $CENTOS cargo build --release
- run: ./ci/build-tarballs.sh "${{ matrix.build }}" "${{ matrix.target }}"
- uses: actions/upload-artifact@v3
with:
name: bins-${{ matrix.build }}
path: dist
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'bytecodealliance/wit-bindgen'
with:
files: "dist/*"