Skip to content

Commit

Permalink
Test arch
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 24, 2023
1 parent ed14155 commit ab97a4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04, macos-12, macos-11]
opensearch-version: [2, 1]
os: [ubuntu-22.04, macos-12]
opensearch-version: [2]
include:
- os: windows-2022
opensearch-version: 2
- os: windows-2019
opensearch-version: 2
steps:
- uses: actions/checkout@v4
- uses: ./.
Expand Down
9 changes: 7 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,20 @@ function isWindows() {
}

function getUrl() {
let arch = process.arch;
if (!['x64', 'arm64'].includes(arch)) {
throw `Unsupported architecture: ${arch}`;
}

let url;
if (process.platform == 'darwin') {
// TODO use Mac build when available
// https://github.com/opensearch-project/opensearch-build/issues/38
url = `https://artifacts.opensearch.org/releases/bundle/opensearch/${opensearchVersion}/opensearch-${opensearchVersion}-linux-x64.tar.gz`;
url = `https://artifacts.opensearch.org/releases/bundle/opensearch/${opensearchVersion}/opensearch-${opensearchVersion}-linux-${arch}.tar.gz`;
} else if (isWindows()) {
url = `https://artifacts.opensearch.org/releases/bundle/opensearch/${opensearchVersion}/opensearch-${opensearchVersion}-windows-x64.zip`;
} else {
url = `https://artifacts.opensearch.org/releases/bundle/opensearch/${opensearchVersion}/opensearch-${opensearchVersion}-linux-x64.tar.gz`;
url = `https://artifacts.opensearch.org/releases/bundle/opensearch/${opensearchVersion}/opensearch-${opensearchVersion}-linux-${arch}.tar.gz`;
}
return url;
}
Expand Down

0 comments on commit ab97a4c

Please sign in to comment.