From 2aeb77a8a1e1417d7d7e449791e67c99cf013ae6 Mon Sep 17 00:00:00 2001 From: Nate Cook Date: Fri, 14 Feb 2025 11:29:59 -0600 Subject: [PATCH 1/4] Add CI job with cmake build (but not tests yet) --- .github/workflows/pull_request.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 34995e966..321ba0c7b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -25,6 +25,20 @@ jobs: uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main with: windows_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}]" + + cmake-build: + name: CMake Build + runs-on: ubuntu-latest + container: + image: swift:6.0-jammy + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Configure CMake + run: cmake -GNinja -S . -B .cmake-build -DBUILD_EXAMPLES=1 -DBUILD_TESTING=0 + - name: Build + run: cmake --build .cmake-build + soundness: name: Soundness uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main From 4951f90403d1b4fd77853d146350ab0add703243 Mon Sep 17 00:00:00 2001 From: Nate Cook Date: Fri, 14 Feb 2025 11:35:34 -0600 Subject: [PATCH 2/4] Add cmake installation step --- .github/workflows/pull_request.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 321ba0c7b..816ba520b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -34,6 +34,14 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + - name: Install CMake 3.30.2 + run: | + ARCH=`uname -m` + curl -sL https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-linux-$ARCH.tar.gz -O + tar xzf cmake-3.30.2-linux-$ARCH.tar.gz + export PATH="`pwd`/cmake-3.30.2-linux-$ARCH/bin:$PATH" + echo "PATH=$PATH" >> $GITHUB_ENV + cmake --version - name: Configure CMake run: cmake -GNinja -S . -B .cmake-build -DBUILD_EXAMPLES=1 -DBUILD_TESTING=0 - name: Build From 4872d6ea6c664e8fa8f6bc6f64c20a2c873fb0ce Mon Sep 17 00:00:00 2001 From: Nate Cook Date: Fri, 14 Feb 2025 11:39:24 -0600 Subject: [PATCH 3/4] Add curl and ninja installation step --- .github/workflows/pull_request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 816ba520b..2816f8eb7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -34,6 +34,8 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + - name: Install apt dependencies + run: sudo apt-get -qq update && sudo apt-get -qq -y install curl ninja-build - name: Install CMake 3.30.2 run: | ARCH=`uname -m` From 3c4cb733b18535b51af6275a33b0bff30b90d1b9 Mon Sep 17 00:00:00 2001 From: Nate Cook Date: Fri, 14 Feb 2025 11:43:19 -0600 Subject: [PATCH 4/4] No sudo needed --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2816f8eb7..971a1ea25 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -35,7 +35,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - name: Install apt dependencies - run: sudo apt-get -qq update && sudo apt-get -qq -y install curl ninja-build + run: apt-get -qq update && apt-get -qq -y install curl ninja-build - name: Install CMake 3.30.2 run: | ARCH=`uname -m`