diff --git a/.github/workflows/hpc-load-balancer.yml b/.github/workflows/hpc-load-balancer.yml new file mode 100644 index 0000000..cc3a1eb --- /dev/null +++ b/.github/workflows/hpc-load-balancer.yml @@ -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 +