-
Notifications
You must be signed in to change notification settings - Fork 4
103 lines (101 loc) · 3.04 KB
/
build_dart_sdk.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: build_dart_sdk
on:
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc
steps:
- name: Prepare
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- name: Compile
run: |
cd bindings/dart/sdk/rust
rustup set profile minimal
rustup toolchain install stable
rustup default stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
cargo build --profile dart --target=${{ matrix.target }}
cd ../../../
move target\${{ matrix.target }}\dart\*.dll .
7z a ..\${{ matrix.target }}.7z *.dll
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.target }}.7z
tag: ${{ github.ref }}
overwrite: true
file_glob: true
build-osx:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
- aarch64-apple-ios
steps:
- uses: actions/checkout@v4
- name: Compile
run: |
cd bindings/dart/sdk/rust
rustup set profile minimal
rustup toolchain install stable
rustup default stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
cargo build --profile dart --target=${{ matrix.target }}
cd ../../../
mv target/${{ matrix.target }}/dart/*.dylib .
tar acf ../${{ matrix.target }}.tar.xz *.dylib
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.target }}.tar.xz
tag: ${{ github.ref }}
overwrite: true
file_glob: true
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- armv7-linux-androideabi
- aarch64-linux-android
steps:
- uses: actions/checkout@v4
- name: Compile
run: |
cd bindings/dart/sdk/rust
rustup set profile minimal
rustup toolchain install stable
rustup default stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
cargo install cross --git https://github.com/cross-rs/cross
cross build --profile dart --target=${{ matrix.target }}
cd ../../../
mv target/${{ matrix.target }}/dart/*.so .
tar acf ../${{ matrix.target }}.tar.xz *.so
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.target }}.tar.xz
tag: ${{ github.ref }}
overwrite: true
file_glob: true