|
16 | 16 | # See https://github.com/nodejs/release#release-schedule |
17 | 17 | # Node.js v20 EOL = 2026-04-30. v22 EOL = 2027-04-30. v23 EOL = 2025-06-01. v24 EOL = 2028-04-30. |
18 | 18 | NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 --include-regex '_sqlite3' |
| 19 | + # Bun versions - see https://github.com/oven-sh/bun/releases |
| 20 | + BUN_BUILD_CMD: npx --no-install prebuild -r bun -t 1.1.0 --include-regex '_sqlite3' |
19 | 21 |
|
20 | 22 | jobs: |
21 | 23 | test: |
|
53 | 55 | - run: npm run build-debug |
54 | 56 | - run: npm test |
55 | 57 |
|
| 58 | + test-bun: |
| 59 | + strategy: |
| 60 | + matrix: |
| 61 | + os: |
| 62 | + - ubuntu-22.04 |
| 63 | + - macos-13 |
| 64 | + - macos-14 |
| 65 | + bun: |
| 66 | + - 1.1.38 |
| 67 | + name: Testing Bun ${{ matrix.bun }} on ${{ matrix.os }} |
| 68 | + runs-on: ${{ matrix.os }} |
| 69 | + steps: |
| 70 | + - uses: actions/checkout@v5 |
| 71 | + - uses: oven-sh/setup-bun@v2 |
| 72 | + with: |
| 73 | + bun-version: ${{ matrix.bun }} |
| 74 | + - if: ${{ startsWith(matrix.os, 'macos') }} |
| 75 | + run: brew install python-setuptools |
| 76 | + - if: ${{ !startsWith(matrix.os, 'macos') }} |
| 77 | + run: python3 -m pip install setuptools |
| 78 | + - if: ${{ startsWith(matrix.os, 'ubuntu') }} |
| 79 | + run: | |
| 80 | + sudo apt update |
| 81 | + sudo apt install -y gcc-10 g++-10 libreadline-dev libncurses5-dev |
| 82 | + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 |
| 83 | + - run: bun install --ignore-scripts |
| 84 | + - run: bun run build-debug |
| 85 | + - run: bun test |
| 86 | + |
56 | 87 | publish: |
57 | 88 | if: ${{ github.event_name == 'release' }} |
58 | 89 | name: Publishing to NPM |
|
63 | 94 | - prebuild-alpine-arm |
64 | 95 | - prebuild-linux-x64 |
65 | 96 | - prebuild-linux-arm |
| 97 | + - prebuild-bun |
66 | 98 | steps: |
67 | 99 | - uses: actions/checkout@v5 |
68 | 100 | - uses: actions/setup-node@v5 |
@@ -164,3 +196,35 @@ jobs: |
164 | 196 | cd /tmp/project && \ |
165 | 197 | npm install --ignore-scripts && \ |
166 | 198 | ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" |
| 199 | +
|
| 200 | + prebuild-bun: |
| 201 | + if: ${{ github.event_name == 'release' }} |
| 202 | + strategy: |
| 203 | + fail-fast: false |
| 204 | + matrix: |
| 205 | + os: |
| 206 | + - macos-13 |
| 207 | + - macos-14 |
| 208 | + - ubuntu-22.04 |
| 209 | + name: Prebuild Bun on ${{ matrix.os }} |
| 210 | + runs-on: ${{ matrix.os }} |
| 211 | + needs: test-bun |
| 212 | + steps: |
| 213 | + - uses: actions/checkout@v5 |
| 214 | + - uses: actions/setup-node@v5 |
| 215 | + with: |
| 216 | + node-version: 20 |
| 217 | + - uses: oven-sh/setup-bun@v2 |
| 218 | + with: |
| 219 | + bun-version: 1.1.38 |
| 220 | + - if: ${{ startsWith(matrix.os, 'macos') }} |
| 221 | + run: brew install python-setuptools |
| 222 | + - if: ${{ !startsWith(matrix.os, 'macos') }} |
| 223 | + run: python3 -m pip install setuptools |
| 224 | + - if: ${{ startsWith(matrix.os, 'ubuntu') }} |
| 225 | + run: | |
| 226 | + sudo apt update |
| 227 | + sudo apt install -y gcc-10 g++-10 libreadline-dev libncurses5-dev |
| 228 | + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 |
| 229 | + - run: npm install --ignore-scripts |
| 230 | + - run: ${{ env.BUN_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} |
0 commit comments