-
-
Notifications
You must be signed in to change notification settings - Fork 3
99 lines (86 loc) · 3.15 KB
/
compiler.yaml
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
name: Compiler
on:
push:
branches: [main]
pull_request:
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/[email protected]
# Compiler
- name: 'Compiler: clippy'
run: cargo clippy -- --deny warnings
- name: 'Compiler: test'
run: cargo test --workspace
- name: 'Compiler: fmt'
run: cargo fmt --check
# Core
- name: 'Core: run'
run: cargo run --release -- check packages/Core/_.candy
# fuzzing:
# name: Fuzzing
# runs-on: ubuntu-latest
# steps:
# - uses: actions/[email protected]
# - uses: dsherret/rust-toolchain-file@v1
# - uses: Swatinem/[email protected]
# - run: cargo run --release -- fuzz packages/Benchmark.candy
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/[email protected]
- name: Run benchmark
working-directory: compiler/vm/
run: cargo bench -- --output-format bencher | tee benchmark_output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Compiler
tool: cargo
output-file-path: compiler/vm/benchmark_output.txt
gh-pages-branch: gh-pages
gh-repository: github.com/candy-lang/benchmark-results
benchmark-data-dir-path: ./
# Only push results to the benchmark repository if we ran on a commit
# to the main branch.
auto-push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
github-token: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && secrets.BENCHMARK_RESULTS_TOKEN || secrets.BENCHMARK_RESULTS_COMMENT_TOKEN }}
# Forks don't have access to secrets, so we can't create a commit
# comment. This step can still fail to notify us and the output shows
# results.
comment-always: ${{ github.secret_source == 'Actions' || github.secret_source == 'Dependabot' }}
comment-on-alert: ${{ github.secret_source == 'Actions' || github.secret_source == 'Dependabot' }}
alert-threshold: 200%
# Benchmarks running on GitHub Actions have a very high variance.
fail-on-alert: true
vscode-extension-check:
name: Check VS Code Extension
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
defaults:
run:
working-directory: vscode_extension/
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm install @microsoft/[email protected]
- name: Run ESLint
run: |
npx eslint . \
--ext .ts \
--format @microsoft/eslint-formatter-sarif \
--output-file eslint-results.sarif
continue-on-error: true
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: vscode_extension/eslint-results.sarif
wait-for-processing: true