Bump actions/cache from 3 to 4 #84
Workflow file for this run
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
name: Builds | |
on: | |
push: | |
paths: | |
- "**.java" | |
- "**/pom.xml" | |
- .github/workflows/builds.yaml | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- "**.java" | |
- "**/pom.xml" | |
- .github/workflows/builds.yaml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
permissions: | |
packages: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/hse-project/ci-images/ubuntu-22.04:master | |
steps: | |
- name: Determine branches | |
id: determine-branches | |
shell: sh +e {0} | |
run: | | |
for p in hse hse-java; do | |
branch=master | |
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then | |
git ls-remote --exit-code --heads \ | |
"https://github.com/hse-project/$p.git" "$GITHUB_HEAD_REF" \ | |
> /dev/null | |
if [ $? -eq 0 ]; then | |
branch="$GITHUB_HEAD_REF" | |
fi | |
elif [ "$GITHUB_EVENT_NAME" = "release" ]; then | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
else | |
git ls-remote --exit-code --heads \ | |
"https://github.com/hse-project/$p.git" "$GITHUB_REF" \ | |
> /dev/null | |
if [ $? -eq 0 ]; then | |
branch="$GITHUB_REF_NAME" | |
fi | |
fi | |
echo "$p=$branch" >> "$GITHUB_OUTPUT" | |
done | |
- name: Checkout hse-java | |
uses: actions/checkout@v4 | |
with: | |
repository: hse-project/hse-java | |
path: hse-java | |
ref: ${{ steps.determine-branches.outputs.hse-java }} | |
- name: Checkout HSE | |
uses: actions/checkout@v4 | |
with: | |
repository: hse-project/hse | |
path: hse-java/subprojects/hse | |
ref: ${{ steps.determine-branches.outputs.hse }} | |
- name: Export Maven local repository | |
id: maven-local-repository | |
run: | | |
local_repository=$(mvn help:evaluate -Dexpression=settings.localRepository --quiet -DforceStdout) | |
echo "local-repository=$local_repository" >> "$GITHUB_OUTPUT" | |
- name: Cache Maven dependencies | |
id: maven-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.maven-local-repository.outputs.local-repository }} | |
key: maven-dependencies-${{ hashFiles('**/pom.xml') }} | |
- name: Setup hse-java | |
run: | | |
cd hse-java | |
meson setup builddir --fatal-meson-warnings --werror \ | |
--buildtype=release --prefix=/usr -Ddocs=false | |
- name: Build hse-java | |
run: | | |
cd hse-java | |
ninja -C builddir | |
- name: Install hse-java | |
run: | | |
cd hse-java | |
meson install -C builddir | |
- name: Checkout YCSB | |
uses: actions/checkout@v4 | |
with: | |
path: hse-ycsb | |
- name: Build YCSB | |
run: | | |
cd hse-ycsb | |
mvn -pl hse -am clean package | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: hse-ycsb | |
path: hse-java/builddir/meson-logs/ |