Skip to content

Commit

Permalink
Revert "[vald-client-clj]: Use vald-client-ci workflows for release a…
Browse files Browse the repository at this point in the history
…nd e2e (…" (#292)

This reverts commit 1210d41.
  • Loading branch information
hlts2 authored May 9, 2024
1 parent 1210d41 commit c1d42f0
Show file tree
Hide file tree
Showing 8 changed files with 376 additions and 187 deletions.
222 changes: 222 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
# name: Build native image
# on:
# push:
# branches:
# - main
# tags:
# - '*.*.*'
# - 'v*.*.*'
# - '*.*.*-*'
# - 'v*.*.*-*'
# pull_request:
# paths:
# - .github/**
# - src/**
# - cmd/**
# - project.clj
# - Makefile
# - VALD_CLIENT_CLJ_VERSION
#
# jobs:
# build-linux:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install GraalVM
# run: |
# TMP_GRAALVM_HOME=/tmp/graalvm
# GRAALVM_HOME=/tmp/graalvm
# GRAALVM_TGZ_URI="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-${JAVA_VERSION}-linux-amd64-${GRAALVM_VERSION}.tar.gz"
# curl -sL $GRAALVM_TGZ_URI --output graalvm.tar.gz
# mkdir -p $TMP_GRAALVM_HOME
# tar -xf graalvm.tar.gz -C $TMP_GRAALVM_HOME --strip-components=1
# chmod -R a+rwx $TMP_GRAALVM_HOME
# echo "PATH=$GRAALVM_HOME/bin:$PATH" >> $GITHUB_ENV
# echo "GRAALVM_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# echo "JAVA_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# env:
# GRAALVM_VERSION: 21.0.0
# JAVA_VERSION: java11
# - name: Install dependencies
# run: |
# gu install native-image
# curl -o lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
# chmod a+x lein
# sudo ./lein version
# sudo apt-get update && sudo apt-get install -y upx
# - name: Build native-image
# run: |
# make valdcli
# # upx --lzma --best valdcli
# chmod a+x valdcli
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: valdcli-linux
# path: ./valdcli
# build-linux-static:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install GraalVM
# run: |
# TMP_GRAALVM_HOME=/tmp/graalvm
# GRAALVM_HOME=/tmp/graalvm
# GRAALVM_TGZ_URI="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-${JAVA_VERSION}-linux-amd64-${GRAALVM_VERSION}.tar.gz"
# curl -sL $GRAALVM_TGZ_URI --output graalvm.tar.gz
# mkdir -p $TMP_GRAALVM_HOME
# tar -xf graalvm.tar.gz -C $TMP_GRAALVM_HOME --strip-components=1
# chmod -R a+rwx $TMP_GRAALVM_HOME
# echo "PATH=$GRAALVM_HOME/bin:$PATH" >> $GITHUB_ENV
# echo "GRAALVM_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# echo "JAVA_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# env:
# GRAALVM_VERSION: 21.0.0
# JAVA_VERSION: java11
# - name: Install dependencies
# run: |
# gu install native-image
# curl -o lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
# chmod a+x lein
# sudo ./lein version
# sudo apt-get update && sudo apt-get install -y upx
# - name: Fetch bundle
# run: |
# curl -L -o musl.tar.gz https://github.com/gradinac/musl-bundle-example/releases/download/v1.0/musl.tar.gz
# tar xvzf musl.tar.gz
# mv bundle /tmp/musl
# - name: Build musl-gcc
# run: |
# curl -o musl-${MUSL_VERSION}.tar.gz https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz
# tar xzvf musl-${MUSL_VERSION}.tar.gz
# cd musl-${MUSL_VERSION}
# ./configure --disable-shared --prefix=/tmp/musl
# make
# make install
# export PATH=$PATH:/tmp/musl/bin
# echo "PATH=/tmp/musl/bin:$PATH" >> $GITHUB_ENV
# env:
# MUSL_VERSION: 1.2.1
# - name: Build static native-image
# run: |
# make OPTS="--static --libc=musl" valdcli
# # upx --lzma --best valdcli
# chmod a+x valdcli
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: valdcli-linux-static
# path: ./valdcli
# build-macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install GraalVM
# run: |
# TMP_GRAALVM_HOME=/tmp/graalvm
# GRAALVM_HOME=/tmp/graalvm/Contents/Home
# GRAALVM_TGZ_URI="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-${JAVA_VERSION}-darwin-amd64-${GRAALVM_VERSION}.tar.gz"
# curl -sL $GRAALVM_TGZ_URI --output graalvm.tar.gz
# mkdir -p $TMP_GRAALVM_HOME
# tar -xf graalvm.tar.gz -C $TMP_GRAALVM_HOME --strip-components=1
# chmod -R a+rwx $TMP_GRAALVM_HOME
# echo "PATH=$GRAALVM_HOME/bin:$PATH" >> $GITHUB_ENV
# echo "GRAALVM_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# echo "JAVA_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# env:
# GRAALVM_VERSION: 21.0.0
# JAVA_VERSION: java11
# - name: Install dependencies
# run: |
# brew install leiningen
# gu install native-image
# brew install upx
# - name: Build native-image
# run: |
# make valdcli
# # upx --lzma --best valdcli
# chmod a+x valdcli
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: valdcli-macos
# path: ./valdcli
# release:
# runs-on: ubuntu-latest
# needs:
# - build-linux
# - build-linux-static
# - build-macos
# steps:
# - uses: actions/checkout@v3
# - name: Create release
# if: startsWith( github.ref, 'refs/tags/')
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: false
# - name: mkdir
# if: startsWith( github.ref, 'refs/tags/')
# run: |
# mkdir -p tmp/linux
# mkdir -p tmp/linux-static
# mkdir -p tmp/macos
# - uses: actions/download-artifact@v3
# if: startsWith( github.ref, 'refs/tags/')
# with:
# name: valdcli-linux
# path: tmp/linux
# - uses: actions/download-artifact@v3
# if: startsWith( github.ref, 'refs/tags/')
# with:
# name: valdcli-linux-static
# path: tmp/linux-static
# - uses: actions/download-artifact@v3
# if: startsWith( github.ref, 'refs/tags/')
# with:
# name: valdcli-macos
# path: tmp/macos
# - name: zip
# if: startsWith( github.ref, 'refs/tags/')
# run: |
# chmod a+x tmp/linux/valdcli
# chmod a+x tmp/linux-static/valdcli
# chmod a+x tmp/macos/valdcli
# zip --junk-paths valdcli-linux tmp/linux/valdcli
# zip --junk-paths valdcli-linux-static tmp/linux-static/valdcli
# zip --junk-paths valdcli-macos tmp/macos/valdcli
# - name: Upload Release Asset (linux)
# if: startsWith( github.ref, 'refs/tags/')
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./valdcli-linux.zip
# asset_name: valdcli-linux.zip
# asset_content_type: application/zip
# - name: Upload Release Asset (linux-static)
# if: startsWith( github.ref, 'refs/tags/')
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./valdcli-linux-static.zip
# asset_name: valdcli-linux-static.zip
# asset_content_type: application/zip
# - name: Upload Release Asset (macos)
# if: startsWith( github.ref, 'refs/tags/')
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./valdcli-macos.zip
# asset_name: valdcli-macos.zip
# asset_content_type: application/zip
85 changes: 85 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# name: E2E test and Deploy to Clojars
# on:
# push:
# branches:
# - main
# tags:
# - '*.*.*'
# - 'v*.*.*'
# - '*.*.*-*'
# - 'v*.*.*-*'
# pull_request:
#
# jobs:
# e2e:
# name: Run E2E Tests
# runs-on: ubuntu-latest
# steps:
# - name: Check out code.
# uses: actions/checkout@v3
# - name: Install dependencies
# run: |
# curl -o lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
# chmod a+x lein
# sudo ./lein version
# - uses: rinx/[email protected]
# with:
# version: latest
# name: vald
# agents: 1
# - name: check k3d
# run: |
# kubectl cluster-info
# - uses: azure/setup-helm@v3
# - name: Helm version
# run: |
# helm version
# - name: deploy Vald
# run: |
# helm repo add vald https://vald.vdaas.org/charts
# helm install \
# --values ${VALUES} \
# --set defaults.image.tag=nightly \
# --set agent.ngt.dimension=300 \
# --set agent.ngt.auto_index_length=2 \
# --set agent.minReplicas=1 \
# --set gateway.lb.enabled=false \
# --set discoverer.enabled=false \
# --set manager.index.enabled=false \
# --generate-name vald/vald
# sleep 3
# kubectl wait --for=condition=ready pod -l app=vald-agent --timeout=3m
# kubectl get pods
# env:
# VALUES: https://raw.githubusercontent.com/vdaas/vald/main/.github/helm/values/values-lb.yaml
# - name: Download data
# run: |
# curl -OL https://raw.githubusercontent.com/rinx/word2vecjson/master/data/wordvecs1000.json
# - name: run tests
# run: |
# kubectl port-forward statefulset/vald-agent 8081:8081 &
# pid=$!
#
# ./lein test
#
# kill $pid
# deploy:
# if: startsWith( github.ref, 'refs/tags/')
# needs:
# - e2e
# name: Deploy to Clojars
# runs-on: ubuntu-latest
# steps:
# - name: Check out code.
# uses: actions/checkout@v3
# - name: Install dependencies
# run: |
# curl -o lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
# chmod a+x lein
# sudo ./lein version
# - name: Deploy
# run: |
# ./lein deploy clojars
# env:
# CLOJARS_USER: ${{ secrets.CLOJARS_USER }}
# CLOJARS_PASS: ${{ secrets.CLOJARS_PASS }}
33 changes: 0 additions & 33 deletions .github/workflows/e2e.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/release.yaml

This file was deleted.

Loading

0 comments on commit c1d42f0

Please sign in to comment.