From 9f49e79cdaec9e3993803bdff75ee81a0a3cc194 Mon Sep 17 00:00:00 2001 From: Fabrice de Gans Date: Wed, 18 Dec 2024 14:14:19 -0800 Subject: [PATCH] [devtools] Add swift-lmdb to the devtools job swift-lmdb is now a required dependency of IndexStoreDB. --- .github/workflows/build-toolchain.yml | 4 +++ .github/workflows/swift-toolchain.yml | 36 +++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-toolchain.yml b/.github/workflows/build-toolchain.yml index 4ddc6ec2d..04496b865 100644 --- a/.github/workflows/build-toolchain.yml +++ b/.github/workflows/build-toolchain.yml @@ -162,6 +162,7 @@ jobs: swift_foundation_icu_revision: ${{ steps.context.outputs.swift_foundation_icu_revision }} swift_installer_scripts_revision: ${{ steps.context.outputs.swift_installer_scripts_revision }} swift_llbuild_revision: ${{ steps.context.outputs.swift_llbuild_revision }} + swift_lmdb_revision: ${{ steps.context.outputs.swift_lmdb_revision }} swift_markdown_revision: ${{ steps.context.outputs.swift_markdown_revision }} swift_package_manager_revision: ${{ steps.context.outputs.swift_package_manager_revision }} swift_revision: ${{ steps.context.outputs.swift_revision }} @@ -253,6 +254,7 @@ jobs: swift_foundation_icu_revision=refs/tags/0.0.8 swift_installer_scripts_revision=refs/heads/main swift_llbuild_revision=refs/tags/${{ inputs.swift_tag }} + swift_lmdb_revision=refs/heads/main swift_markdown_revision=refs/tags/${{ inputs.swift_tag }} swift_package_manager_revision=refs/tags/${{ inputs.swift_tag }} swift_syntax_revision=refs/tags/${{ inputs.swift_tag }} @@ -672,6 +674,7 @@ jobs: swift_foundation_icu_revision: ${{ needs.context.outputs.swift_foundation_icu_revision }} swift_installer_scripts_revision: ${{ needs.context.outputs.swift_installer_scripts_revision }} swift_llbuild_revision: ${{ needs.context.outputs.swift_llbuild_revision }} + swift_lmdb_revision: ${{ needs.context.outputs.swift_lmdb_revision }} swift_markdown_revision: ${{ needs.context.outputs.swift_markdown_revision }} swift_package_manager_revision: ${{ needs.context.outputs.swift_package_manager_revision }} swift_revision: ${{ needs.context.outputs.swift_revision }} @@ -746,6 +749,7 @@ jobs: swift_foundation_icu_revision: ${{ needs.context.outputs.swift_foundation_icu_revision }} swift_installer_scripts_revision: ${{ needs.context.outputs.swift_installer_scripts_revision }} swift_llbuild_revision: ${{ needs.context.outputs.swift_llbuild_revision }} + swift_lmdb_revision: ${{ needs.context.outputs.swift_lmdb_revision }} swift_markdown_revision: ${{ needs.context.outputs.swift_markdown_revision }} swift_package_manager_revision: ${{ needs.context.outputs.swift_package_manager_revision }} swift_revision: ${{ needs.context.outputs.swift_revision }} diff --git a/.github/workflows/swift-toolchain.yml b/.github/workflows/swift-toolchain.yml index d6db049dd..b0720e30f 100644 --- a/.github/workflows/swift-toolchain.yml +++ b/.github/workflows/swift-toolchain.yml @@ -131,6 +131,10 @@ on: required: true type: string + swift_lmdb_revision: + required: true + type: string + swift_markdown_revision: required: true type: string @@ -2601,6 +2605,12 @@ jobs: ref: ${{ inputs.swift_llbuild_revision }} path: ${{ github.workspace }}/SourceCache/swift-llbuild show-progress: false + - uses: actions/checkout@v4 + with: + repository: swiftlang/swift-lmdb + ref: ${{ inputs.swift_lmdb_revision }} + path: ${{ github.workspace }}/SourceCache/swift-lmdb + show-progress: false - uses: actions/checkout@v4 with: repository: swiftlang/swift-markdown @@ -3071,6 +3081,26 @@ jobs: - name: Build swift-format run: cmake --build ${{ github.workspace }}/BinaryCache/swift-format + - name: Configure swift-lmdb + run: | + # Workaround CMake 3.20 issue + $CLANG_CL = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/clang-cl.exe + $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe + + cmake -B ${{ github.workspace }}/BinaryCache/swift-lmdb ` + -D BUILD_SHARED_LIBS=NO ` + -D CMAKE_BUILD_TYPE=Release ` + -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr ` + -D CMAKE_C_COMPILER=${CLANG_CL} ` + -D CMAKE_C_COMPILER_TARGET=${{ matrix.triple }} ` + -D CMAKE_C_FLAGS="${{ inputs.WINDOWS_CMAKE_C_FLAGS }}" ` + -D CMAKE_SYSTEM_NAME=Windows ` + -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} ` + -G Ninja ` + -S ${{ github.workspace }}/SourceCache/swift-lmdb + - name: Build swift-lmdb + run: cmake --build ${{ github.workspace }}/BinaryCache/swift-lmdb + - name: Configure IndexStoreDB run: | # Workaround CMake 3.20 issue @@ -3096,7 +3126,8 @@ jobs: -D CMAKE_SYSTEM_NAME=Windows ` -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} ` -G Ninja ` - -S ${{ github.workspace }}/SourceCache/indexstore-db + -S ${{ github.workspace }}/SourceCache/indexstore-db ` + -D LMDB_DIR=${{ github.workspace }}/BinaryCache/swift-lmdb/cmake/modules - name: Build indexstore-db run: cmake --build ${{ github.workspace }}/BinaryCache/indexstore-db @@ -3134,7 +3165,8 @@ jobs: -D SwiftPM_DIR=${{ github.workspace }}/BinaryCache/swift-package-manager/cmake/modules ` -D SwiftSyntax_DIR=${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules ` -D SwiftSystem_DIR=${{ github.workspace }}/BinaryCache/swift-system/cmake/modules ` - -D TSC_DIR=${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules + -D TSC_DIR=${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules ` + -D LMDB_DIR=${{ github.workspace }}/BinaryCache/swift-lmdb/cmake/modules - name: Build SourceKit-LSP run: cmake --build ${{ github.workspace }}/BinaryCache/SourceKit-LSP