File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050 which curl jq || apt -q update
5151 which curl || apt -yq install curl
5252 which jq || apt -yq install jq
53+ git config --global --add safe.directory $GITHUB_WORKSPACE
54+ cd ${{ inputs.cmake_build_target_directory }}
5355 CONFIG_JSON='${{ inputs.update_cmake_lists_config }}' FAIL_ON_CHANGES=true ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/cmake-update-cmake-lists.sh
5456 - name : CMake build
5557 run : |
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ log "Building Ninja build files for target"
3333build_dir=" ${target_dir} /build"
3434mkdir -p " $build_dir "
3535cd " ${build_dir} " || fatal " Could not 'cd' to ${build_dir} "
36- ASM=" $ASSEMBLY_COMPILER_BIN " " $CMAKE_BIN " build -G Ninja -S ..
36+ ASM=" $ASSEMBLY_COMPILER_BIN " " $CMAKE_BIN " -G Ninja -S ..
3737
3838log " Building target"
3939" $NINJA_BIN "
Original file line number Diff line number Diff line change @@ -126,7 +126,8 @@ echo "$config" | jq -c '.targets[]' | while read -r target; do
126126done
127127
128128if [[ " ${fail_on_changes} " == true ]]; then
129- if [ -n " $( git status --untracked-files=no --porcelain) " ]; then
129+ git_status_output=$( git status --untracked-files=no --porcelain 2>&1 ) || fatal " git status failed: $git_status_output "
130+ if [ -n " $git_status_output " ]; then
130131 fatal " Changes in the cmake files detected. Please update. -- $( git diff) "
131132 else
132133 log " ✅ CMake files are up-to-date."
Original file line number Diff line number Diff line change 1+ //===----------------------------------------------------------------------===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c ) 2026 Apple Inc. and the Swift project authors
6+ // Licensed under Apache License v2.0 with Runtime Library Exception
7+ //
8+ // See https://swift.org/LICENSE.txt for license information
9+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+ //
11+ //===----------------------------------------------------------------------===//
12+
113cmake_minimum_required (VERSION 3.24 )
214
315project (TestPackage
Original file line number Diff line number Diff line change 1+ //===----------------------------------------------------------------------===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c ) 2026 Apple Inc. and the Swift project authors
6+ // Licensed under Apache License v2.0 with Runtime Library Exception
7+ //
8+ // See https://swift.org/LICENSE.txt for license information
9+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+ //
11+ //===----------------------------------------------------------------------===//
12+
113add_library (Target1
214 "Target1.swift"
315)
Original file line number Diff line number Diff line change 1+ //===----------------------------------------------------------------------===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c ) 2026 Apple Inc. and the Swift project authors
6+ // Licensed under Apache License v2.0 with Runtime Library Exception
7+ //
8+ // See https://swift.org/LICENSE.txt for license information
9+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+ //
11+ //===----------------------------------------------------------------------===//
12+
113add_library (Target2
214 "Target2.swift"
315)
You can’t perform that action at this time.
0 commit comments