mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-03 16:56:36 +00:00
[CONAN] cache build directory too
This commit is contained in:
2
.github/actions/dependencies/action.yml
vendored
2
.github/actions/dependencies/action.yml
vendored
@@ -14,7 +14,7 @@ runs:
|
||||
- name: install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ${build_dir}
|
||||
mkdir -p ${build_dir} # TODO:CONAN
|
||||
cd ${build_dir}
|
||||
conan install \
|
||||
--output-folder . \
|
||||
|
||||
23
.github/workflows/macos-ga.yml
vendored
23
.github/workflows/macos-ga.yml
vendored
@@ -111,6 +111,20 @@ jobs:
|
||||
~/.conan2
|
||||
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
|
||||
|
||||
# After your cache restore for Conan but before the build step
|
||||
- name: Restore build directory cache
|
||||
id: build-cache-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ env.build_dir }}
|
||||
# Primary key without SHA - much higher hit probability
|
||||
key: ${{ runner.os }}-build-${{ matrix.configuration }}-${{ github.ref_name }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}
|
||||
restore-keys: |
|
||||
# Same branch, different dependencies
|
||||
${{ runner.os }}-build-${{ matrix.configuration }}-${{ github.ref_name }}-
|
||||
# Same configuration, any branch
|
||||
${{ runner.os }}-build-${{ matrix.configuration }}-
|
||||
|
||||
# Build still calls the install dependency installation every time
|
||||
# but it should be fast if the ~/.conan folder is primed with pre-build deps
|
||||
- name: Build
|
||||
@@ -119,6 +133,15 @@ jobs:
|
||||
generator: ${{ matrix.generator }}
|
||||
configuration: ${{ matrix.configuration }}
|
||||
|
||||
# After your build step but before tests or artifact uploads
|
||||
- name: Save build directory cache
|
||||
if: success()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ env.build_dir }}
|
||||
# Reference the primary key from the restore step
|
||||
key: ${{ steps.build-cache-restore.outputs.cache-primary-key }}
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||
32
.github/workflows/nix-ga.yml
vendored
32
.github/workflows/nix-ga.yml
vendored
@@ -109,11 +109,38 @@ jobs:
|
||||
${{ matrix.cc }} --version
|
||||
${{ matrix.cxx }} --version
|
||||
|
||||
# After your Conan cache restore but before the build step
|
||||
- name: Restore build directory cache
|
||||
id: build-cache-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ env.build_dir }}
|
||||
# Primary key without SHA - much higher hit probability
|
||||
key: ${{ runner.os }}-build-${{ matrix.compiler }}-${{ matrix.configuration }}-${{ github.ref_name }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}
|
||||
restore-keys: |
|
||||
# Same branch, different dependencies
|
||||
${{ runner.os }}-build-${{ matrix.compiler }}-${{ matrix.configuration }}-${{ github.ref_name }}-
|
||||
# Same compiler/config, any branch
|
||||
${{ runner.os }}-build-${{ matrix.compiler }}-${{ matrix.configuration }}-
|
||||
|
||||
- name: Build
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
generator: Ninja
|
||||
configuration: ${{ matrix.configuration }}
|
||||
env:
|
||||
# Make sure the build action receives the build_dir explicitly
|
||||
build_dir: ${{ env.build_dir }}
|
||||
|
||||
# After your build step but before tests or artifact uploads
|
||||
- name: Save build directory cache
|
||||
if: success()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ env.build_dir }}
|
||||
# Reference the primary key from the restore step
|
||||
key: ${{ steps.build-cache-restore.outputs.cache-primary-key }}
|
||||
|
||||
|
||||
- name: Set artifact name
|
||||
id: set-artifact-name
|
||||
@@ -122,6 +149,11 @@ jobs:
|
||||
echo "artifact_name=${ARTIFACT_NAME}" >> "$GITHUB_OUTPUT"
|
||||
echo "Using artifact name: ${ARTIFACT_NAME}"
|
||||
|
||||
- name: Debug build directory
|
||||
run: |
|
||||
echo "Checking build directory contents..."
|
||||
ls -la ${{ env.build_dir }} || echo "Build directory not found"
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user