Skip to content

Commit

Permalink
install cc if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jun 19, 2024
1 parent a3233b5 commit a8e8e1b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dagger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rust",
"sdk": "github.com/fluentci-io/daggerverse/deno-sdk@main",
"version": "v0.10.5",
"version": "v0.10.6",
"description": "",
"author": "Tsiry Sandratraina",
"license": "MIT"
Expand Down
2 changes: 1 addition & 1 deletion fluentci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ authors = [
description = "CI/CD Plugin for Rust"
license = "MIT"
name = "rust"
version = "0.10.5"
version = "0.10.6"
2 changes: 1 addition & 1 deletion plugin/Cargo.lock

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

2 changes: 1 addition & 1 deletion plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "rust"
version = "0.10.5"
version = "0.10.6"

[lib]
crate-type = ["cdylib"]
Expand Down
6 changes: 6 additions & 0 deletions plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub fn clippy() -> FnResult<String> {
.pipeline("clippy")?
.pkgx()?
.with_packages(vec!["curl", "wget"])?
.with_exec(vec!["type cc > /dev/null || pkgx install gnu.org/gcc"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"])?
.with_exec(vec!["rustup", "component", "add", "clippy"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "install", "clippy-sarif", "--version", "0.3.0"])?
Expand All @@ -51,6 +52,7 @@ pub fn llvmcov() -> FnResult<String> {
.pkgx()?
.with_packages(vec!["curl", "wget"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"])?
.with_exec(vec!["type cc > /dev/null || pkgx install gnu.org/gcc"])?
.with_exec(vec!["rustup", "component", "add", "llvm-tools"])?
.with_exec(vec![
"wget",
Expand Down Expand Up @@ -80,6 +82,7 @@ pub fn test(args: String) -> FnResult<String> {
.pipeline("test")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type cc > /dev/null || pkgx install gnu.org/gcc"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "test", &args])?
.stdout()?;
Expand All @@ -94,6 +97,7 @@ pub fn build(args: String) -> FnResult<String> {
.pipeline("build")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type cc > /dev/null || pkgx install gnu.org/gcc"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "build", &args])?
.stdout()?;
Expand All @@ -108,6 +112,7 @@ pub fn target_add(args: String) -> FnResult<String> {
.pipeline("target_add")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type cc > /dev/null || pkgx install gnu.org/gcc"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "rustup", "target", "add", &args])?
.stdout()?;
Expand All @@ -122,6 +127,7 @@ pub fn component_add(args: String) -> FnResult<String> {
.pipeline("component_add")?
.pkgx()?
.with_packages(vec![ "curl"])?
.with_exec(vec!["type cc > /dev/null || pkgx install gnu.org/gcc"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "rustup", "component", "add", &args])?
.stdout()?;
Expand Down

0 comments on commit a8e8e1b

Please sign in to comment.