Release (v6) #23
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: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "apps/solver/**" | |
- "bun.lockb" | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-solver: | |
strategy: | |
matrix: | |
include: | |
- target: linux-x64 | |
outfile: linux-x64 | |
- target: windows-x64 | |
outfile: windows-x64.exe | |
- target: darwin-x64 | |
outfile: macos-x64 | |
- target: darwin-arm64 | |
outfile: macos-arm64 | |
name: Build (${{ matrix.target }}) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: 1.1.29 # 1.1.30 breaks bytecode compilation (see oven-sh/bun#12508) | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Build solver | |
working-directory: apps/solver | |
run: bun run build | |
- name: Build solver (standalone) | |
working-directory: apps/solver | |
run: bun build --minify --sourcemap --compile --bytecode --target=bun-${{ matrix.target }} --outfile=dist/solver-${{ matrix.outfile }} dist/index.js $(find dist -name '*.js' -not -name 'index.js') | |
- name: Build mock server | |
working-directory: apps/mock-server | |
run: bun run build | |
- name: Build mock server (standalone) | |
working-directory: apps/mock-server | |
run: bun build --minify --sourcemap --compile --bytecode --target=bun-${{ matrix.target }} --outfile=dist/server-${{ matrix.outfile }} dist/index.js | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: solver-${{ matrix.target }} | |
path: | | |
apps/solver/dist/solver-${{ matrix.outfile }} | |
apps/mock-server/dist/server-${{ matrix.outfile }} | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Test (schemas) | |
working-directory: packages/schemas | |
run: bun test | |
- name: Test (algorithm) | |
working-directory: packages/algorithm | |
run: bun test | |
- name: Test (mock server) | |
working-directory: apps/mock-server | |
run: bun test |