-
Notifications
You must be signed in to change notification settings - Fork 28
45 lines (43 loc) · 1.26 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
name: ci
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
toolchain: [nightly]
deno_version: [1.33.1]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno_version }}
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
components: rustfmt, clippy
- name: Build
run: cargo build --locked --release
- name: Build Example (debug)
working-directory: ./example
run: |
deno run -A ../cli.ts
deno test -A --unstable
- name: Build Example (release)
working-directory: ./example
shell: bash
run: |
rm -rf target
deno run -A ../cli.ts --release=../target/release
deno test -A --unstable