-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (74 loc) · 2.47 KB
/
py_node_lib.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build NodeJS lib for use in Python lib
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup JVM and Clojure tooling
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: 21
- name: Setup Clojure build tools
uses: DeLaGuardo/setup-clojure@12.5
with:
cli: 1.11.2.1446
- name: Setup cache for Clojure dependencies
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
key: cljdeps-${{ hashFiles('deps.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
# key: cljdeps-${{ hashFiles('project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
# Setup Nodejs and pnpm
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8.15.5
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install pnpm dependencies
run: pnpm install
- name: Setup SWI-Prolog
uses: smucclaw/setup-swi-prolog@master
with:
swi-prolog-branch: devel
swi-prolog-version: latest
- name: Install SWI-Prolog dependencies
run: |
swipl -t "pack_install(date_time, [interactive(false), test(false)])" \
&& swipl -t "pack_install(clpBNR, [interactive(false), test(false)])"
- name: Precompile SWI-Prolog files to qlf
run: pnpm build:swipl-qlfs
- name: Build NodeJS lib
run: pnpm build:py-node-lib