-
Notifications
You must be signed in to change notification settings - Fork 25
98 lines (93 loc) · 2.58 KB
/
build.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
90
91
92
93
94
95
96
97
98
name: Build
on:
push:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Build csdemoparser
run: cargo build -p csdemoparser --release
- name: Test csdemoparser
run: cargo test -p csdemoparser --release
- uses: actions/upload-artifact@v3
with:
name: rust-linux
path: target/release/csdemoparser
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Build csdemoparser
run: cargo build -p csdemoparser --release
- name: Test csdemoparser
run: cargo test -p csdemoparser --release
- uses: actions/upload-artifact@v3
with:
name: rust-windows
path: target/release/csdemoparser.exe
package:
runs-on: ubuntu-latest
needs: [linux, windows]
steps:
- uses: actions/checkout@v3
# oldui
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'src/newui/package-lock.json'
- run: npm install -g bower
- run: bower install
# newui
- name: newui
run: |
cd src/newui
npm install
npm run build
cp -R dist/spa/* ../../resources/public/
# Clojure
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Install Leiningen
uses: DeLaGuardo/[email protected]
with:
lein: '2.10.0'
- name: Cache Clojure dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: cljdeps-${{ hashFiles('project.clj') }}
restore-keys: cljdeps-
- name: Build jar
run: LEIN_SNAPSHOTS_IN_RELEASE=1 lein uberjar
- run: |
mv target-lein/hsbox-*-standalone.jar target-lein/hsbox-standalone.jar
echo 'java -jar hsbox-standalone.jar --port 4000' > target-lein/headshotbox.sh
chmod a+x target-lein/headshotbox.sh
# Package
- uses: actions/download-artifact@v3
with:
name: rust-linux
path: release
- uses: actions/download-artifact@v3
with:
name: rust-windows
path: release
- name: Zip
run: zip -j headshotbox.zip target-lein/hsbox-standalone.jar target-lein/headshotbox.sh release/csdemoparser release/csdemoparser.exe
- uses: actions/upload-artifact@v3
with:
name: headshotbox
path: headshotbox.zip