forked from dragonstyle/deno-dom
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 2.38 KB
/
macos-arm.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
name: build-macos-arm
on:
workflow_dispatch:
push:
paths:
- 'Cargo.toml'
- 'html-parser/core/**'
- 'html-parser/plugin/**'
- '.github/workflows/**'
pull_request:
branches-ignore: [master]
paths:
- 'Cargo.toml'
- 'html-parser/core/**'
- 'html-parser/plugin/**'
- '.github/workflows/**'
jobs:
build:
name: ${{ matrix.kind }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [macos-latest-xlarge]
env:
GH_ACTIONS: true
RUST_BACKTRACE: full
DENO_BUILD_MODE: release
steps:
- name: Clone repository
uses: actions/checkout@v1
- name: Install rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: '1.60.0'
- name: Log versions
run: |
rustc --version
cargo --version
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Remove Some Cache
if: matrix.os == 'windows-latest'
run: |
rm target/release/gn_root -Recurse -ErrorAction Ignore
rm target/debug/gn_root -Recurse -ErrorAction Ignore
- name: Build
env:
RUST_BACKTRACE: 1
run: |
export MACOSX_DEPLOYMENT_TARGET=11.0
cargo clean && cargo build --release
mv target/release/libplugin.dylib target/release/libplugin-aarch64.dylib
- name: Release Plugin
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'release draft'
draft: true
files: |
target/release/libplugin.dylib
target/release/plugin.dll
target/release/libplugin.so
target/release/libplugin-aarch64.dylib
target/aarch64-unknown-linux-gnu/release/libplugin-linux-aarch64.so