-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: #52 initial steps for bundled release
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: hpc-load-balancer | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
|
||
jobs: | ||
|
||
build-and-setup: | ||
runs-on: ubuntu-latest | ||
container: ubuntu:latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Dependencies | ||
run: | | ||
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y g++ make wget curl tar | ||
- name: Build load balancer binary | ||
run: | | ||
cd hpc && make build-load-balancer | ||
- name: Download and setup hq binary | ||
run: | | ||
url=$(curl -sL https://api.github.com/repos/It4innovations/hyperqueue/releases/latest | \ | ||
grep -o "\"browser_download_url\": \"https://[^\"]*-linux-x64.tar.gz\"" | \ | ||
cut -d '"' -f 4) | ||
if [ -z "$url" ]; then | ||
echo "Error: URL not found" | ||
exit 1 | ||
fi | ||
version=$(echo $url | grep -o 'v[0-9]*\.[0-9]*\.[0-9]*') | ||
echo "Version: $version" | ||
filename="hq-${version}-linux-x64.tar.gz" | ||
wget $url -O $filename | ||
tar xzf $filename | ||