Skip to content

Commit

Permalink
fix: make install.dependencies on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez committed Jun 25, 2024
1 parent 91c52d7 commit b5f8885
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ concurrency:
cancel-in-progress: true

jobs:
make-install-dependencies:
strategy:
fail-fast: false
matrix:
os: [macos-13, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Setup go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: e2e/go.mod
cache-dependency-path: e2e/go.sum
- name: Install platform dependencies
run: make install.dependencies
- name: Clean up dependencies
run: make clean

e2e-tests:
strategy:
fail-fast: false
Expand Down
12 changes: 11 additions & 1 deletion deps/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ esac
# pull artifact from dependency repository
curl -L --fail "${url}/${artifact}" > "${file}"

shasum_command=()
if hash sha512sum; then
shasum_command=(sha512sum)
elif hash shasum; then
shasum_command=(shasum --algorithm 512)
else
echo "error: shasum dependency not found" && exit 1
fi

# validate shasum for downloaded artifact
(shasum --algorithm 512 "${file}" | cut -d ' ' -f 1 | grep -xq "^${digest}$") || \
shasum=$("${shasum_command[@]}" "${file}")
(echo "${shasum}" | cut -d ' ' -f 1 | grep -xq "^${digest}$") || \
(echo "error: shasum verification failed for dependency" && rm -f "${file}" && exit 1)

0 comments on commit b5f8885

Please sign in to comment.