55 outputs :
66 artifact_id :
77 description : " ID of the artifact containing prebuilt SQLite libraries"
8- value : " todo "
8+ value : ${{ jobs.merge_assets.outputs.artifact }}
99 push :
1010 branches :
1111 - v3
@@ -50,30 +50,30 @@ jobs:
5050 name : Compile sqlite3
5151 steps :
5252 - uses : actions/checkout@v4
53- # - uses: actions/cache@v4
54- # id: cache_build
55- # with:
56- # path: out/
57- # key: sqlite-prebuilt-${{ runner.os }}-${{ hashFiles('tool/') }}
53+ - uses : actions/cache@v4
54+ id : cache_build
55+ with :
56+ path : out/
57+ key : sqlite-prebuilt-${{ runner.os }}-${{ hashFiles('tool/') }}
5858
5959 - name : Download sqlite3 sources
60- # if: steps.cache_build.outputs.cache-hit != 'true'
60+ if : steps.cache_build.outputs.cache-hit != 'true'
6161 uses : actions/download-artifact@v4
6262 with :
6363 name : sqlite3-src
6464 path : sqlite3-src
6565
6666 - uses : dart-lang/setup-dart@v1
67- # if: steps.cache_build.outputs.cache-hit != 'true'
67+ if : steps.cache_build.outputs.cache-hit != 'true'
6868
6969 - name : Install cross-compiling GCC
7070 shell : bash
71- if : runner.os == 'Linux'
71+ if : runner.os == 'Linux' && steps.cache_build.outputs.cache-hit != 'true'
7272 run : |
7373 sudo apt install -y gcc-aarch64-linux-gnu gcc-riscv64-linux-gnu gcc-arm-linux-gnueabihf gcc-i686-linux-gnu
7474
7575 - name : Compile sqlite3
76- # if: steps.cache_build.outputs.cache-hit != 'true'
76+ if : steps.cache_build.outputs.cache-hit != 'true'
7777 run : |
7878 dart run tool/compile_sqlite.dart
7979
@@ -95,28 +95,29 @@ jobs:
9595 name : Compile sqlite3 Windows
9696 steps :
9797 - uses : actions/checkout@v4
98- # - uses: actions/cache@v4
99- # id: cache_build
100- # with:
101- # path: out/
102- # key: sqlite-prebuilt-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('tool/') }}
98+ - uses : actions/cache@v4
99+ id : cache_build
100+ with :
101+ path : out/
102+ key : sqlite-prebuilt-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('tool/') }}
103103
104104 - name : Download sqlite3 sources
105- # if: steps.cache_build.outputs.cache-hit != 'true'
105+ if : steps.cache_build.outputs.cache-hit != 'true'
106106 uses : actions/download-artifact@v4
107107 with :
108108 name : sqlite3-src
109109 path : sqlite3-src
110110
111111 - uses : dart-lang/setup-dart@v1
112- # if: steps.cache_build.outputs.cache-hit != 'true'
112+ if : steps.cache_build.outputs.cache-hit != 'true'
113113
114114 - uses : ilammy/msvc-dev-cmd@v1
115+ if : steps.cache_build.outputs.cache-hit != 'true'
115116 with :
116117 arch : ${{ matrix.arch }}
117118
118119 - name : Compile sqlite3
119- # if: steps.cache_build.outputs.cache-hit != 'true'
120+ if : steps.cache_build.outputs.cache-hit != 'true'
120121 run : |
121122 dart run tool/compile_sqlite.dart ${{ matrix.arch }}
122123
@@ -127,3 +128,30 @@ jobs:
127128 path : out/
128129 if-no-files-found : error
129130 retention-days : 1
131+
132+ merge_assets :
133+ runs-on : ubuntu-latest
134+ needs : [build_sqlite, build_sqlite_windows]
135+ name : Merge prebuilt libraries into single directory
136+ outputs :
137+ artifact : ${{ steps.upload.outputs.artifact-id }}
138+ steps :
139+ - uses : actions/checkout@v4
140+
141+ - uses : actions/download-artifact@v5
142+ with :
143+ name : sqlite3-libs-${{ runner.os }}-${{ matrix.arch }}
144+ path : out/
145+ merge-multiple : true
146+ pattern : sqlite3-libs-*
147+
148+ - run : ls -al out/
149+
150+ - name : Upload final binaries
151+ uses : actions/upload-artifact@v4
152+ id : upload
153+ with :
154+ name : sqlite3-precompiled
155+ path : out/
156+ if-no-files-found : error
157+ retention-days : 1
0 commit comments