Skip to content
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

Remove Support for Auto Install Ninja #258

Merged
merged 3 commits into from
Mar 22, 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
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ jobs:
test
sparse-checkout-cone-mode: false

- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@v4

- name: Configure, Build, and Test Project
uses: ./
with:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Configure and build your [CMake](https://cmake.org/) project using [GitHub Actio

- Configures a CMake project using the [`cmake`](https://cmake.org/cmake/help/latest/manual/cmake.1.html) command.
- Optionally builds a CMake project using the `cmake --build` command.
- Auto-detects and installs required dependencies.
- Supports specifying multiple CMake options directly from the action inputs.

## Usage
Expand Down Expand Up @@ -84,6 +83,9 @@ jobs:
#### Using Ninja as the Generator and Clang as the Compiler

```yaml
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@v4

- name: Configure Project
uses: threeal/cmake-action@v1.3.0
with:
Expand Down
16 changes: 0 additions & 16 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3"
"@actions/exec": "^1.1.1"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
Expand Down
15 changes: 0 additions & 15 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as core from "@actions/core";
import { exec } from "@actions/exec";
import { which } from "@actions/io";
import { getInputs } from "./inputs.js";

async function main() {
Expand All @@ -12,20 +11,6 @@ async function main() {
configureArgs.push(...["-G", inputs.generator]);
}

if (inputs.generator.match(/ninja/gi) && !(await which("ninja"))) {
switch (process.platform) {
case "linux":
await exec("sudo", ["apt", "install", "-y", "ninja-build"]);
break;
case "darwin":
await exec("brew", ["install", "ninja"]);
break;
case "win32":
await exec("choco", ["install", "ninja"]);
break;
}
}

if (inputs.cCompiler) {
configureArgs.push("-DCMAKE_C_COMPILER=" + inputs.cCompiler);
}
Expand Down
3 changes: 1 addition & 2 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading