Skip to content

Commit 228f78a

Browse files
authored
[devtools] Add swift-lmdb to the devtools job (#876)
swift-lmdb is now a required dependency of IndexStoreDB.
1 parent 936db4e commit 228f78a

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ jobs:
162162
swift_foundation_icu_revision: ${{ steps.context.outputs.swift_foundation_icu_revision }}
163163
swift_installer_scripts_revision: ${{ steps.context.outputs.swift_installer_scripts_revision }}
164164
swift_llbuild_revision: ${{ steps.context.outputs.swift_llbuild_revision }}
165+
swift_lmdb_revision: ${{ steps.context.outputs.swift_lmdb_revision }}
165166
swift_markdown_revision: ${{ steps.context.outputs.swift_markdown_revision }}
166167
swift_package_manager_revision: ${{ steps.context.outputs.swift_package_manager_revision }}
167168
swift_revision: ${{ steps.context.outputs.swift_revision }}
@@ -253,6 +254,7 @@ jobs:
253254
swift_foundation_icu_revision=refs/tags/0.0.8
254255
swift_installer_scripts_revision=refs/heads/main
255256
swift_llbuild_revision=refs/tags/${{ inputs.swift_tag }}
257+
swift_lmdb_revision=refs/heads/main
256258
swift_markdown_revision=refs/tags/${{ inputs.swift_tag }}
257259
swift_package_manager_revision=refs/tags/${{ inputs.swift_tag }}
258260
swift_syntax_revision=refs/tags/${{ inputs.swift_tag }}
@@ -672,6 +674,7 @@ jobs:
672674
swift_foundation_icu_revision: ${{ needs.context.outputs.swift_foundation_icu_revision }}
673675
swift_installer_scripts_revision: ${{ needs.context.outputs.swift_installer_scripts_revision }}
674676
swift_llbuild_revision: ${{ needs.context.outputs.swift_llbuild_revision }}
677+
swift_lmdb_revision: ${{ needs.context.outputs.swift_lmdb_revision }}
675678
swift_markdown_revision: ${{ needs.context.outputs.swift_markdown_revision }}
676679
swift_package_manager_revision: ${{ needs.context.outputs.swift_package_manager_revision }}
677680
swift_revision: ${{ needs.context.outputs.swift_revision }}
@@ -746,6 +749,7 @@ jobs:
746749
swift_foundation_icu_revision: ${{ needs.context.outputs.swift_foundation_icu_revision }}
747750
swift_installer_scripts_revision: ${{ needs.context.outputs.swift_installer_scripts_revision }}
748751
swift_llbuild_revision: ${{ needs.context.outputs.swift_llbuild_revision }}
752+
swift_lmdb_revision: ${{ needs.context.outputs.swift_lmdb_revision }}
749753
swift_markdown_revision: ${{ needs.context.outputs.swift_markdown_revision }}
750754
swift_package_manager_revision: ${{ needs.context.outputs.swift_package_manager_revision }}
751755
swift_revision: ${{ needs.context.outputs.swift_revision }}

.github/workflows/swift-toolchain.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ on:
131131
required: true
132132
type: string
133133

134+
swift_lmdb_revision:
135+
required: true
136+
type: string
137+
134138
swift_markdown_revision:
135139
required: true
136140
type: string
@@ -2601,6 +2605,12 @@ jobs:
26012605
ref: ${{ inputs.swift_llbuild_revision }}
26022606
path: ${{ github.workspace }}/SourceCache/swift-llbuild
26032607
show-progress: false
2608+
- uses: actions/checkout@v4
2609+
with:
2610+
repository: swiftlang/swift-lmdb
2611+
ref: ${{ inputs.swift_lmdb_revision }}
2612+
path: ${{ github.workspace }}/SourceCache/swift-lmdb
2613+
show-progress: false
26042614
- uses: actions/checkout@v4
26052615
with:
26062616
repository: swiftlang/swift-markdown
@@ -3071,6 +3081,26 @@ jobs:
30713081
- name: Build swift-format
30723082
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-format
30733083

3084+
- name: Configure swift-lmdb
3085+
run: |
3086+
# Workaround CMake 3.20 issue
3087+
$CLANG_CL = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/clang-cl.exe
3088+
$SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe
3089+
3090+
cmake -B ${{ github.workspace }}/BinaryCache/swift-lmdb `
3091+
-D BUILD_SHARED_LIBS=NO `
3092+
-D CMAKE_BUILD_TYPE=Release `
3093+
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr `
3094+
-D CMAKE_C_COMPILER=${CLANG_CL} `
3095+
-D CMAKE_C_COMPILER_TARGET=${{ matrix.triple }} `
3096+
-D CMAKE_C_FLAGS="${{ inputs.WINDOWS_CMAKE_C_FLAGS }}" `
3097+
-D CMAKE_SYSTEM_NAME=Windows `
3098+
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} `
3099+
-G Ninja `
3100+
-S ${{ github.workspace }}/SourceCache/swift-lmdb
3101+
- name: Build swift-lmdb
3102+
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-lmdb
3103+
30743104
- name: Configure IndexStoreDB
30753105
run: |
30763106
# Workaround CMake 3.20 issue
@@ -3096,7 +3126,8 @@ jobs:
30963126
-D CMAKE_SYSTEM_NAME=Windows `
30973127
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} `
30983128
-G Ninja `
3099-
-S ${{ github.workspace }}/SourceCache/indexstore-db
3129+
-S ${{ github.workspace }}/SourceCache/indexstore-db `
3130+
-D LMDB_DIR=${{ github.workspace }}/BinaryCache/swift-lmdb/cmake/modules
31003131
- name: Build indexstore-db
31013132
run: cmake --build ${{ github.workspace }}/BinaryCache/indexstore-db
31023133

@@ -3134,7 +3165,8 @@ jobs:
31343165
-D SwiftPM_DIR=${{ github.workspace }}/BinaryCache/swift-package-manager/cmake/modules `
31353166
-D SwiftSyntax_DIR=${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules `
31363167
-D SwiftSystem_DIR=${{ github.workspace }}/BinaryCache/swift-system/cmake/modules `
3137-
-D TSC_DIR=${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules
3168+
-D TSC_DIR=${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules `
3169+
-D LMDB_DIR=${{ github.workspace }}/BinaryCache/swift-lmdb/cmake/modules
31383170
- name: Build SourceKit-LSP
31393171
run: cmake --build ${{ github.workspace }}/BinaryCache/SourceKit-LSP
31403172

0 commit comments

Comments
 (0)