-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (55 loc) · 1.63 KB
/
ci.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
name: CI
on: push
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
target:
[
x86_64-unknown-linux-gnu,
aarch64-unknown-linux-gnu,
x86_64-pc-windows-msvc,
x86_64-apple-darwin,
aarch64-apple-darwin,
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: denoland/setup-deno@v1
- uses: actions/cache@v4
with:
path: ~/.cache/deno/deps
key: ${{ runner.os }}-${{ hashFiles('deno.lock') }}
- run: BUILD_ARGS="--target ${{ matrix.target }}" deno task build
- run: tar -czf mtkruto-server-${{ matrix.os }}.tar.gz mtkruto-server*
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: mtkruto-server-${{ matrix.os }}.tar.gz
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
include:
- platform: ubuntu-latest
cache_path: ~/.cache/deno/deps
- platform: macos-latest
cache_path: ~/Library/Caches/deno/deps
- platform: windows-latest
cache_path: ~\AppData\Local\deno\deps
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: denoland/setup-deno@v1
- uses: actions/cache@v4
with:
path: ${{ matrix.cache_path }}
key: ${{ runner.os }}-${{ hashFiles('deno.lock') }}
- run: deno task test