Files
libhalo/.github/workflows/check.yml
Michał Leszczyński 76017db1d9 Fix CI
2025-12-17 02:45:14 +01:00

72 lines
1.8 KiB
YAML

name: Check build
on:
push:
paths-ignore:
- 'README.md'
- 'cli/README.md'
- 'docs/**'
pull_request:
paths-ignore:
- 'README.md'
- 'cli/README.md'
- 'docs/**'
branches:
- master
jobs:
check:
runs-on: ubuntu-24.04
steps:
- name: Install native dependencies (Linux)
run: |
sudo apt-get update && sudo apt-get install -y libpcsclite-dev pcscd pcsc-tools
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Node.JS
uses: actions/setup-node@v4
with:
node-version: 20
- name: Enable corepack
run: |
corepack enable
- name: Install dependencies
shell: bash
run: |
yarn workspaces focus --all
yarn install --immutable
- name: Run tsc (core)
run: |
cd core
yarn tsc
- name: Run webpack (core)
run: |
cd core
yarn webpack
- name: Run tsc (cli)
run: |
cd cli
yarn tsc
- name: Build halo-tools with webpack
shell: bash
run: |
cd cli
yarn webpack
mv dist_webpack/* .
mkdir build
cp ../node_modules/@pokusew/pcsclite/build/Release/pcsclite.node build/pcsclite.node
cp package.json orig-package.json
- name: Package HaLo CLI tool (Linux)
shell: bash
run: |
cd cli
node ./build_scripts/ci_scripts.js --platform linux --product cli
npx json-merger orig-package.json bin-cli.json -p -o package.json
yarn pkg --compress GZip -t node20-linux-x64 -o dist/halocli .
- name: Test produced binary
shell: bash
run: |
cd cli
chmod +x dist/halocli
sudo ./dist/halocli cli_version