Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
janekmi committed Oct 1, 2024
1 parent 2725a8d commit 4ae2ae4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/daos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2024, Intel Corporation
#

name: DAOS

on:
push:

jobs:
daos_tests:
uses: pmem/pmdk/.github/workflows/daos_tests.yml
with:
DAOS_REF: release/2.6
33 changes: 19 additions & 14 deletions .github/workflows/daos_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
name: DAOS tests

on:
push:
workflow_call:
inputs:
DAOS_REF:
required: true
type: string

permissions: {}

env:
DAOS_BUILD: 0
DAOS_PATH: /opt/daos

jobs:
Expand All @@ -31,11 +34,20 @@ jobs:
repository: pmem/pmdk
path: pmdk

- name: Restore ${{ env.DAOS_PATH }} from cache
id: cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.DAOS_PATH }}
key: opt_daos-${{ inputs.DAOS_REF }}
fail-on-cache-miss: false

- name: Apply DAOS patches
if: ${{ env.DAOS_BUILD == 1 }}
if: steps.cache.outputs.cache-hit != 'true'
working-directory: daos
run: git apply ../pmdk/src/test/daos_dtx/*.patch

# It seems necessary for both building and running.
- name: Install DAOS' dependencies
working-directory: daos
run: |
Expand All @@ -44,7 +56,7 @@ jobs:
# https://go.dev/doc/install
- name: Update the golang package
if: ${{ env.DAOS_BUILD == 1 }}
if: steps.cache.outputs.cache-hit != 'true'
env:
GOLANG_VER: go1.23.1 # >= 1.21 because of https://go.dev/doc/toolchain
run: |
Expand All @@ -57,7 +69,7 @@ jobs:
run: sudo ./install-valgrind.sh

- name: Generate ${{ env.OPTS_FILE }}
if: ${{ env.DAOS_BUILD == 1 }}
if: steps.cache.outputs.cache-hit != 'true'
working-directory: daos
env:
OPTS_FILE: daos.conf
Expand All @@ -71,27 +83,20 @@ jobs:
cat ${{ env.OPTS_FILE }}
- name: Build DAOS
if: ${{ env.DAOS_BUILD == 1 }}
if: steps.cache.outputs.cache-hit != 'true'
working-directory: daos
run: |
git submodule init
git submodule update
scons install -j16 --build-deps=yes
- name: Save ${{ env.DAOS_PATH }} as cache
if: ${{ env.DAOS_BUILD == 1 }}
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.DAOS_PATH }}
key: opt_daos

- name: Restore ${{ env.DAOS_PATH }} from cache
if: ${{ env.DAOS_BUILD == 0 }}
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.DAOS_PATH }}
key: opt_daos

- name: Install PMDK's dependencies
run: sudo apt-get install libndctl-dev libdaxctl-dev pandoc

Expand Down

0 comments on commit 4ae2ae4

Please sign in to comment.