-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3946bd
commit 2245c80
Showing
2 changed files
with
118 additions
and
1 deletion.
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,113 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: vespaengine/vespa-build-almalinux-8:latest | ||
|
||
steps: | ||
- name: Setup tools | ||
run: | | ||
dnf config-manager --add-repo https://raw.githubusercontent.com/vespa-engine/vespa/master/dist/vespa-engine.repo | ||
LATEST="$(curl -SsL https://api.github.com/repos/sibprogrammer/xq/releases/latest | jq -r '.tag_name')" | ||
curl -sSL -o xq.tar.gz https://github.com/sibprogrammer/xq/releases/latest/download/xq_${LATEST//v/}_linux_amd64.tar.gz | ||
tar -xzf xq.tar.gz | ||
mv xq /usr/local/bin/xq | ||
- name: Get Latest Vespa version | ||
id: vespa-metadata | ||
run: | | ||
VESPA_VERSION=$(curl -sSL https://repo1.maven.org/maven2/com/yahoo/vespa/parent/maven-metadata.xml | \ | ||
xq -x '/metadata/versioning/latest') | ||
echo "Using version: $VESPA_VERSION" | ||
echo "version=$VESPA_VERSION" >> $GITHUB_OUTPUT | ||
- name: Configure Git | ||
env: | ||
VESPA_VERSION: ${{ steps.vespa-metadata.outputs.version }} | ||
run: | | ||
git config --global --add safe.directory "$(pwd)" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
- uses: actions/checkout@v4 | ||
|
||
- name: build-rpm | ||
env: | ||
VESPA_VERSION: ${{ steps.vespa-metadata.outputs.version }} | ||
run: | | ||
# git config --global --add safe.directory "$(pwd)" | ||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "GitHub Actions" | ||
git tag -d "v$VESPA_VERSION" || true | ||
git tag -a "v$VESPA_VERSION" -m "Version $VESPA_VERSION" | ||
mkdir builds | ||
make -f .copr/Makefile rpm outdir=$(pwd)/builds | ||
git status | ||
ls -lA builds | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: vespa-rpm | ||
path: builds | ||
retention-days: 1 | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- build | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: vespa-rpm | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
load: true | ||
tags: local-vespa-ann-benchmark | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
repository: erikbern/ann-benchmarks | ||
path: ann-benchmarks | ||
|
||
- name: Update Dockerfile | ||
run: | | ||
sed -i -e 's,^FROM.*,FROM local-vespa-ann-benchmark,' ann_benchmarks/algorithms/vespa/Dockerfile | ||
- name: Build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
load: true | ||
tags: ann-benchmark | ||
context: ann-benchmarks | ||
file: ann_benchmarks/algorithms/vespa/Dockerfile | ||
|
||
- name: Test | ||
run: | | ||
echo "No tests. Please add." |
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