-
Notifications
You must be signed in to change notification settings - Fork 45
118 lines (110 loc) · 3.61 KB
/
release.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Release
on:
push:
tags:
- "v*"
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
with:
command: install
args: --path crates/flowistry_ide --debug --locked
- run: npm install && npm run build
working-directory: ide
- run: pip3 install -r scripts/requirements.txt && python3 scripts/check_versions.py
build-artifacts:
needs: test
strategy:
matrix:
include:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- os: macos-12
target: x86_64-apple-darwin
- os: windows-2022
target: x86_64-pc-windows-msvc
## TODO: rustc_private is inserting incorrect dylib/so paths on ARM
## targets b/c the Github Actions runner is x86, see issue #25.
## Either:
## * rustc_private cross compilation needs to get fixed
## * or github actions needs to provide ARM runners
## For what's been tried so far, see:
## https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/rustc_private.20cross-compilation
# - os: ubuntu-20.04
# target: aarch64-unknown-linux-gnu
# - os: macos-11
# target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-01-06
components: rust-src, rustc-dev, llvm-tools-preview
target: ${{ matrix.target }}
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked
- run: python3 ../../scripts/prepare_artifact.py ${{ matrix.target }}
working-directory: target/release
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.target }}
path: target/release/${{ matrix.target }}.zip
publish-release:
needs: build-artifacts
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v2
- uses: softprops/action-gh-release@v1
with:
files: |
x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu.zip
x86_64-apple-darwin/x86_64-apple-darwin.zip
x86_64-pc-windows-msvc/x86_64-pc-windows-msvc.zip
publish-extension:
needs: publish-release
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./ide
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v4
with:
node-version: lts
- run: npm install
- run: npm install -g vsce && vsce publish -p ${{ secrets.VSCODE_TOKEN }}
- run: npm install -g ovsx && npx ovsx publish -p ${{ secrets.OVSX_TOKEN }}
publish-crate:
needs: publish-extension
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- run: cargo login ${{ secrets.CRATES_IO_TOKEN }} && cargo install cargo-workspaces
- uses: actions-rs/cargo@v1
with:
command: ws
args: publish --from-git --yes
publish-docs:
needs: test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- run: cargo doc --lib
- run: RUSTDOCFLAGS="--html-in-header scripts/katex-header.html" cargo doc --lib --no-deps
- uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: ./target/doc
clean: true
clean-exclude: dev