Skip to content

Add install cmake action - #310

Open
etcwilde wants to merge 1 commit into
swiftlang:mainfrom
etcwilde:ewilde/install-cmake-action
Open

Add install cmake action#310
etcwilde wants to merge 1 commit into
swiftlang:mainfrom
etcwilde:ewilde/install-cmake-action

Conversation

@etcwilde

Copy link
Copy Markdown
Member

Adding an action to install a specific version of CMake. The version is verified against a hash before being unpacked and installed.

I have verified this with several versions of CMake on Linux.
I haven't had a setup with macOS or Windows to test against yet, but the GitHub actions docs say that bash is available on all platforms (as is powershell, but I don't want to write powershell) with the note

When specifying a bash shell on Windows, the bash shell included with Git for Windows is used.

The link format is consistent, with cmake-<version>-<arch>.(tar.gz|.zip). There are OS-specific installer-based packages, but the tarballs and zips are easier to unpack and verify reliably.

@etcwilde
etcwilde requested a review from a team as a code owner August 18, 2026 22:54
@etcwilde etcwilde added the github_actions Pull requests that update GitHub Actions code label Aug 18, 2026
Comment thread .github/actions/install-cmake/readme.md Outdated

- name: Install CMake
id: install-cmake
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@<version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right path?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it is not. Nice catch.

@etcwilde
etcwilde force-pushed the ewilde/install-cmake-action branch from c30f5aa to 062f1a7 Compare August 18, 2026 23:08
@etcwilde

Copy link
Copy Markdown
Member Author
-#!/bin/bash
+#!/usr/bin/env bash

... really? That's not even part of the license.

Adding an action to install a specific version of CMake. The version is
verified against a hash before being unpacked and installed.
@etcwilde
etcwilde force-pushed the ewilde/install-cmake-action branch from 062f1a7 to c4e323a Compare August 18, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants