|
33 | 33 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
|
34 | 34 | echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
35 | 35 |
|
| 36 | + - name: Install build dependencies - Bun |
| 37 | + uses: oven-sh/setup-bun@v2 |
| 38 | + with: |
| 39 | + bun-version: 1.1.22 |
| 40 | + |
36 | 41 | - name: Check style
|
37 | 42 | run: cargo fmt --check
|
38 | 43 |
|
|
42 | 47 | - name: Build
|
43 | 48 | run: cargo build --verbose
|
44 | 49 |
|
| 50 | + build-frontend: |
| 51 | + runs-on: ubuntu-22.04 |
| 52 | + steps: |
| 53 | + - name: Checkout |
| 54 | + uses: actions/checkout@v4 |
| 55 | + |
| 56 | + - name: Setup Bun |
| 57 | + uses: oven-sh/setup-bun@v2 |
| 58 | + with: |
| 59 | + bun-version: 1.1.22 |
| 60 | + |
| 61 | + - name: Install dependencies and build Bun project |
| 62 | + run: | |
| 63 | + cd ping-viewer-next-frontend |
| 64 | + bun install --frozen-lockfile |
| 65 | + bun run build |
| 66 | +
|
| 67 | + - name: Upload dist folder |
| 68 | + |
| 69 | + with: |
| 70 | + name: dist |
| 71 | + path: ./ping-viewer-next-frontend/dist |
| 72 | + |
45 | 73 | build:
|
46 |
| - needs: quick-tests |
| 74 | + needs: [quick-tests, build-frontend] |
47 | 75 | runs-on: ${{ matrix.os }}
|
48 | 76 | strategy:
|
49 | 77 | fail-fast: false
|
@@ -73,11 +101,18 @@ jobs:
|
73 | 101 | run: echo "${{ matrix.TARGET }}"
|
74 | 102 |
|
75 | 103 | - uses: actions/checkout@master
|
| 104 | + |
| 105 | + - name: Download frontend build |
| 106 | + |
| 107 | + with: |
| 108 | + name: dist |
| 109 | + path: ./ping-viewer-next-frontend/dist |
| 110 | + |
76 | 111 | - name: Build
|
77 | 112 | uses: houseabsolute/[email protected]
|
78 | 113 | with:
|
79 | 114 | target: ${{ matrix.TARGET }}
|
80 |
| - args: "--release" |
| 115 | + args: "--release --features embed-frontend" |
81 | 116 |
|
82 | 117 | - name: Rename
|
83 | 118 | run: cp target/${{ matrix.TARGET }}/release/${{ github.event.repository.name }}${{ matrix.EXTENSION }} ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
|
0 commit comments