cs2: Parse game events. #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |