Repository navigation
74 lines (71 loc) · 2.4 KB
/
Copy pathnative-packages.yml
File metadata and controls
74 lines (71 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Native packages
"on":
workflow_dispatch:
inputs:
console:
description: Include the compiled console
type: boolean
default: false
permissions:
contents: read
jobs:
package:
strategy:
fail-fast: false
matrix:
runner: [ubuntu-24.04, macos-15]
runs-on: ${{ matrix.runner }}
timeout-minutes: 50
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install TypeScript SDK build dependencies
working-directory: sdk/typescript
run: npm ci --ignore-scripts
- name: Build the matching console
if: inputs.console
working-directory: frontend
env:
TOKENCRAFT_SOURCE_REVISION: ${{ github.sha }}
VITE_TOKENCRAFT_PACKAGED: "true"
VITE_API_BASE_URL: ""
run: |
npm ci --ignore-scripts
npm run build
- name: Install PostgreSQL 17 on Ubuntu
if: runner.os == 'Linux'
run: bash .github/scripts/install-postgresql17-ubuntu.sh
- name: Install PostgreSQL 17 on macOS
if: runner.os == 'macOS'
shell: bash
run: |
brew list --versions postgresql@17 >/dev/null || brew install postgresql@17
brew list --versions jq >/dev/null || brew install jq
echo "$(brew --prefix postgresql@17)/bin" >> "$GITHUB_PATH"
- name: Build and verify the unpacked package
shell: bash
env:
INCLUDE_CONSOLE: ${{ inputs.console }}
run: |
rustup show
postgres --version | grep -E '^postgres \(PostgreSQL\) 17\.'
command -v initdb pg_ctl
python3 -B -m unittest discover -s scripts -p test_native_package.py
options=()
if [[ "$INCLUDE_CONSOLE" == true ]]; then
options+=(--console-dir frontend/dist)
fi
python3 scripts/native_package.py --output "$RUNNER_TEMP/native-packages" --source-revision "$GITHUB_SHA" --sdk-quickstarts "${options[@]}"
- uses: actions/upload-artifact@v4
with:
name: tokencraft-native-${{ matrix.runner }}
path: ${{ runner.temp }}/native-packages/tokencraft-*.tar.gz*
if-no-files-found: error
compression-level: 0