Skip to content

Commit

Permalink
add mock server to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
instructr13 committed Oct 14, 2024
1 parent 76ccbce commit 1c50f66
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
strategy:
matrix:
include:
- target: bun-linux-x64
outfile: solver-linux-x64
- target: bun-windows-x64
outfile: solver-windows-x64.exe
- target: bun-darwin-x64
outfile: solver-macos-x64
- target: bun-darwin-arm64
outfile: solver-macos-arm64

name: Build solver (${{ matrix.target }})
- 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:
Expand All @@ -48,19 +48,29 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build
- name: Build solver
working-directory: apps/solver
run: bun run build

- name: Build (standalone)
- name: Build solver (standalone)
working-directory: apps/solver
run: bun build --minify --sourcemap --compile --bytecode --target=${{ matrix.target }} --outfile=dist/${{ matrix.outfile }} $(find dist -name '*.js')
run: bun build --minify --sourcemap --compile --bytecode --target=bun-${{ matrix.target }} --outfile=dist/solver-${{ matrix.outfile }} $(find dist -name '*.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/${{ matrix.outfile }}
path: |
apps/solver/dist/solver-${{ matrix.outfile }}
apps/mock-server/dist/server-${{ matrix.outfile }}
test:
name: Test
Expand Down

0 comments on commit 1c50f66

Please sign in to comment.