-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (69 loc) · 1.87 KB
/
build.yaml
File metadata and controls
83 lines (69 loc) · 1.87 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
83
name: Build Status
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
checks: write
pull-requests: write
jobs:
build:
strategy:
fail-fast: false
matrix:
template:
- python
- cpp
- js
- jupyter
- rust
- rustjswasm
- cppjswasm
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Prework
run: |
# python
touch pyproject.toml
# node
echo '{"name": "a", "version": "0.0.0", "scripts": {}}' > package.json
printf 'lockfileVersion: '9.0'\nsettings:\n\tautoInstallPeers: true\n\texcludeLinksFromLockfile: false\nimporters:\n.: {}' > pnpm-lock.yaml
# rust
printf '[package]\nname = "rust"\nversion = "0.1.0"\nedition = "2021"\n[dependencies]\n' > Cargo.toml
mkdir -p src
printf 'fn main() {\n println!("Hello, world!");\n}\n' > src/main.rs
- uses: actions-ext/python/setup@main
with:
version: '3.11'
- run: uv pip install copier
- name: Install clang-format
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get install -y clang-format-14
sudo ln -sf /usr/bin/clang-format-14 /usr/bin/clang-format
elif [[ "$RUNNER_OS" == "macOS" ]]; then
brew install clang-format
fi
- uses: actions-ext/node/setup@main
with:
version: 22.x
js_folder: "."
- uses: actions-ext/rust/setup@main
- run: |
pnpm install
cargo build
- run: |
make gen-${{matrix.template}}
make test-${{matrix.template}}