Skip to content

Commit

Permalink
ci: duplicate depends building
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Nov 18, 2024
1 parent 6a51ab2 commit cac7eb1
Showing 1 changed file with 14 additions and 60 deletions.
74 changes: 14 additions & 60 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}


- name: Prepare
id: prepare
run: |
Expand Down Expand Up @@ -63,24 +62,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- build_target: arm-linux
host: arm-linux-gnueabihf
- build_target: linux64
host: x86_64-pc-linux-gnu
- build_target: linux64_tsan
host: x86_64-pc-linux-gnu
- build_target: linux64_ubsan
host: x86_64-pc-linux-gnu
- build_target: linux64_fuzz
host: x86_64-pc-linux-gnu
- build_target: linux64_cxx20
host: x86_64-pc-linux-gnu
- build_target: linux64_sqlite
host: x86_64-pc-linux-gnu
- build_target: linux64_nowallet
host: x86_64-pc-linux-gnu

host: [arm-linux-gnueabihf, x86_64-pc-linux-gnu]
container:
image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
options: --user root
Expand All @@ -105,14 +87,20 @@ jobs:
with:
path: |
depends/${{ matrix.host }}
key: ${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
key: ${{ runner.os }}-depends-${{ matrix.host }}-${{ hashFiles('depends/packages/*') }}
restore-keys: |
${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
${{ runner.os }}-depends-${{ matrix.build_target }}
${{ runner.os }}-depends-${{ matrix.host }}-${{ hashFiles('depends/packages/*') }}
${{ runner.os }}-depends-${{ matrix.host }}
- name: Build dependencies
run: make -j$(nproc) -C depends HOST=${{ matrix.host }}

- name: Upload built depends
uses: actions/upload-artifact@v4
with:
name: depends-${{ matrix.host }}
path: depends/${{ matrix.host }}

build:
name: Build
needs: [build-image, build-depends]
Expand Down Expand Up @@ -146,16 +134,11 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}


- name: Restore Cache dependencies
uses: actions/cache/restore@v4
- name: Download built depends
uses: actions/download-artifact@v4
with:
path: |
depends/${{ matrix.host }}
key: ${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
restore-keys: |
${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
${{ runner.os }}-depends-${{ matrix.build_target }}
name: depends-${{ matrix.host }}
path: depends/${{ matrix.host }}

- name: Determine PR Base SHA
id: vars
Expand Down Expand Up @@ -192,32 +175,3 @@ jobs:
name: build-artifacts-${{ matrix.build_target }}
path: |
/output
# Come back to this later and implement tests :)
# test:
# name: Test
# needs: [build-image, build]
# runs-on: ubuntu-22.04
# container:
# image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
# options: --user root
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.head.sha }}
#
# - name: Download build artifacts
# uses: actions/download-artifact@v4
# with:
# name: build-artifacts
# path: src/
#
## - name: Setup environment
## run: |
## echo "BUILD_TARGET=${{ needs.build.matrix.build_target }}"
## source ./ci/dash/matrix.sh
#
# - name: Run integration tests
# run: ./ci/dash/test_integrationtests.sh --extended --exclude feature_pruning,feature_dbcrash

0 comments on commit cac7eb1

Please sign in to comment.