Repository navigation
82 lines (69 loc) · 2.38 KB
/
Copy pathci.yml
File metadata and controls
82 lines (69 loc) · 2.38 KB
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
name: Check and Test
on:
pull_request:
push:
branches:
- master
# Twice a month, so a new toolchain or a dependency's release shows up while nothing is pushed.
schedule:
- cron: "43 1 1,16 * *"
workflow_dispatch:
jobs:
build:
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-26.04, macos-26, windows-2025]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: install-unix
if: ${{ runner.os != 'Windows' }}
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH
- name: install-windows
if: ${{ runner.os == 'Windows' }}
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: post install
run: |
moon version --all
moon update
- name: moon check
run: moon check --target all --deny-warn
- name: moon build
run: moon build --target all
- name: moon test (all backends)
run: moon test --target all
- name: examples run
if: runner.os == 'Linux'
run: |
for dir in src/examples/*/; do
if grep -q 'kind: "executable"' "$dir/moon.pkg" && ! grep -q 'supported_targets = "js"' "$dir/moon.pkg"; then
moon run "$dir" --target native > /dev/null
fi
done
- name: lint (fmt is clean)
run: |
moon fmt && git diff --exit-code
- name: interfaces are up to date
run: |
moon info --target all && git diff --exit-code
- name: the skills are valid
if: runner.os == 'Linux'
run: |
for dir in docs/skills/*/; do
case "$dir" in *CHANGE-ME*) continue ;; esac
[ -f "$dir/SKILL.md" ] || continue
pipx run --spec skills-ref agentskills validate "$dir"
done
# A reader pastes the blocks of the README and the skills into a project, so they have
# to compile as written, against this commit's source.
- name: the code in the docs compiles
if: runner.os == 'Linux'
run: python3 scripts/check_snippets.py