-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (58 loc) · 1.7 KB
/
build.yaml
File metadata and controls
68 lines (58 loc) · 1.7 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
name: Build LibSqlite_Turso Shared Library
on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
build:
name: Build LibSqlite_Turso
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: jirutka/setup-alpine@v1
with:
arch: x86_64
packages: >
openssl-dev
build-base
pkgconf
lld
rustup
- name: Install Rust stable toolchain via rustup
run: rustup-init --default-toolchain nightly --profile minimal -y
shell: alpine.sh {0}
- run: |
export RUSTFLAGS="-C target-feature=-crt-static"
cargo build
cargo build --release
shell: alpine.sh {0}
- name: Find built shared library
id: find_artifact
shell: bash
run: |
DEBUG_SO=target/debug/libsqlite3.so
RELEASE_SO=target/release/libsqlite3.so
if [[ ! -f "$DEBUG_SO" ]]; then
echo "Debug shared library not found at $DEBUG_SO"
exit 1
fi
if [[ ! -f "$RELEASE_SO" ]]; then
echo "Release shared library not found at $RELEASE_SO"
exit 1
fi
echo "DEBUG_ARTIFACT=$DEBUG_SO" >> $GITHUB_ENV
echo "RELEASE_ARTIFACT=$RELEASE_SO" >> $GITHUB_ENV
- name: Upload Debug Artifact
uses: actions/upload-artifact@v4
with:
name: libsqlite3-debug
path: ${{ env.DEBUG_ARTIFACT }}
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
with:
name: libsqlite3-release
path: ${{ env.RELEASE_ARTIFACT }}