Skip to content

[devtools] Add swift-lmdb to the devtools job #876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/swift-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ on:
required: true
type: string

swift_lmdb_revision:
required: true
type: string

swift_markdown_revision:
required: true
type: string
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down