File tree Expand file tree Collapse file tree 1 file changed +38
-5
lines changed
Expand file tree Collapse file tree 1 file changed +38
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Build LibSqlite_Turso Shared Library
2+
13on :
24 push :
35 branches :
46 - main
7+ tags :
8+ - ' *'
59 pull_request :
6- branches :
7- - main
810
911jobs :
10- build_and_test :
12+ build :
1113 name : Build LibSqlite_Turso
12- runs-on : ubuntu-latest
14+ runs-on : ubuntu-22.04
1315 steps :
1416 - uses : actions/checkout@v2
1517 - uses : actions-rs/toolchain@v1
1618 with :
1719 toolchain : stable
18- - run : cargo build --release --all-features
20+ - run : |
21+ cargo build
22+ cargo build --release --all-features
23+
24+
25+
26+ - name : Find built shared library
27+ id : find_artifact
28+ shell : bash
29+ run : |
30+ echo "Looking for debug and release .so files..."
1931
32+ DEBUG_SO=$(find target/debug -type f -name "*.so" | head -n1)
33+ RELEASE_SO=$(find target/release -type f -name "*.so" | head -n1)
34+
35+ if [[ -z "$DEBUG_SO" || -z "$RELEASE_SO" ]]; then
36+ echo "Error: Could not find both debug and release .so files."
37+ exit 1
38+ fi
39+
40+ DEBUG_NAME="$(basename "${DEBUG_SO%.*}")-debug.so"
41+ RELEASE_NAME="$(basename "${RELEASE_SO%.*}")-release.so"
42+
43+ cp "$DEBUG_SO" "$DEBUG_NAME"
44+ cp "$RELEASE_SO" "$RELEASE_NAME"
45+
46+ echo "DEBUG_ARTIFACT=$DEBUG_NAME" >> $GITHUB_ENV
47+ echo "RELEASE_ARTIFACT=$RELEASE_NAME" >> $GITHUB_ENV
48+
49+ - name : Upload built library as artifact
50+ uses : actions/upload-artifact@v4
51+ with :
52+ name : ${{ env.artifact_path }}
You can’t perform that action at this time.
0 commit comments