-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (41 loc) · 1.34 KB
/
build.yaml
File metadata and controls
52 lines (41 loc) · 1.34 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
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:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: |
cargo build
cargo build --release --all-features
- name: Find built shared library
id: find_artifact
shell: bash
run: |
echo "Looking for debug and release .so files..."
DEBUG_SO=$(find target/debug -type f -name "*.so" | head -n1)
RELEASE_SO=$(find target/release -type f -name "*.so" | head -n1)
if [[ -z "$DEBUG_SO" || -z "$RELEASE_SO" ]]; then
echo "Error: Could not find both debug and release .so files."
exit 1
fi
DEBUG_NAME="$(basename "${DEBUG_SO%.*}")-debug.so"
RELEASE_NAME="$(basename "${RELEASE_SO%.*}")-release.so"
cp "$DEBUG_SO" "$DEBUG_NAME"
cp "$RELEASE_SO" "$RELEASE_NAME"
echo "DEBUG_ARTIFACT=$DEBUG_NAME" >> $GITHUB_ENV
echo "RELEASE_ARTIFACT=$RELEASE_NAME" >> $GITHUB_ENV
- name: Upload built library as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_path }}