Skip to content

Commit

Permalink
fix(influxdb): fix influxdb install on macos aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 21, 2024
1 parent eec8f31 commit 0b26004
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/influxdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
influxdb-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
9 changes: 9 additions & 0 deletions influxdb/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ pub fn install_influxdb() -> Result<(), Error> {
_ => &arch,
};

if os == "darwin" && arch == "arm64" {
dag()
.pipeline("setup-influxdb")?
.with_exec(vec![r#"type brew > /dev/null 2> /dev/null || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)""#])?
.with_exec(vec!["type influx > /dev/null 2> /dev/null || brew install influxdb"])?
.stdout()?;
return Ok(());
}

dag().set_envs(vec![("OS".into(), os.into()), ("ARCH".into(), arch.into())])?;

let version = dag().get_env("INFLUXDB_VERSION")?;
Expand Down

0 comments on commit 0b26004

Please sign in to comment.