-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (79 loc) · 2.5 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: cargo test
build:
strategy:
fail-fast: false
matrix:
include:
- vscode-platform: win32-x64
rust-target: x86_64-pc-windows-gnu
github-os: ubuntu-22.04
ext: ".exe"
install-script: sudo apt-get install -y mingw-w64
- vscode-platform: linux-x64
rust-target: x86_64-unknown-linux-musl
github-os: ubuntu-22.04
ext: ""
install-script: ""
- vscode-platform: darwin-x64
rust-target: x86_64-apple-darwin
github-os: macos-13
ext: ""
install-script: ""
- vscode-platform: darwin-arm64
rust-target: aarch64-apple-darwin
github-os: macos-14
ext: ""
install-script: ""
runs-on: ${{ matrix.github-os }}
steps:
- uses: actions/checkout@v4
- run: ${{ matrix.install-script }}
- run: rustup target add ${{ matrix.rust-target }}
- run: cargo build --release --target ${{ matrix.rust-target }}
- uses: actions/upload-artifact@v4
with:
name: adroit-${{ matrix.rust-target }}
path: target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }}
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: mkdir packages/adroit-vscode/bin
- run: cp target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} packages/adroit-vscode/bin/adroit${{ matrix.ext }}
- run: bun run --filter=adroit-vscode build -- --target ${{ matrix.vscode-platform }}
- uses: actions/upload-artifact@v4
with:
name: adroit-vscode-${{ matrix.vscode-platform }}
path: packages/adroit-vscode/adroit-vscode-*.vsix
site:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run --filter=@adroit-lang/website build
- uses: actions/upload-pages-artifact@v3
with:
path: packages/website/dist
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: site
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- id: deploy
uses: actions/deploy-pages@v4