mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
ci: deduplicate depends building
This commit is contained in:
parent
6a51ab271d
commit
2f18c1af30
70
.github/workflows/build.yml
vendored
70
.github/workflows/build.yml
vendored
@ -25,7 +25,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prepare
|
id: prepare
|
||||||
run: |
|
run: |
|
||||||
@ -68,18 +67,6 @@ jobs:
|
|||||||
host: arm-linux-gnueabihf
|
host: arm-linux-gnueabihf
|
||||||
- build_target: linux64
|
- build_target: linux64
|
||||||
host: x86_64-pc-linux-gnu
|
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
|
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
|
image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
|
||||||
@ -90,7 +77,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
|
||||||
- name: Cache depends sources
|
- name: Cache depends sources
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@ -113,6 +99,12 @@ jobs:
|
|||||||
- name: Build dependencies
|
- name: Build dependencies
|
||||||
run: make -j$(nproc) -C depends HOST=${{ matrix.host }}
|
run: make -j$(nproc) -C depends HOST=${{ matrix.host }}
|
||||||
|
|
||||||
|
- name: Upload built depends
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: depends-${{ matrix.build_target }}
|
||||||
|
path: depends/${{ matrix.host }}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
needs: [build-image, build-depends]
|
needs: [build-image, build-depends]
|
||||||
@ -123,20 +115,28 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- build_target: arm-linux
|
- build_target: arm-linux
|
||||||
host: arm-linux-gnueabihf
|
host: arm-linux-gnueabihf
|
||||||
|
depends_on: arm-linux
|
||||||
- build_target: linux64
|
- build_target: linux64
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
- build_target: linux64_tsan
|
- build_target: linux64_tsan
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
- build_target: linux64_ubsan
|
- build_target: linux64_ubsan
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
- build_target: linux64_fuzz
|
- build_target: linux64_fuzz
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
- build_target: linux64_cxx20
|
- build_target: linux64_cxx20
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
- build_target: linux64_sqlite
|
- build_target: linux64_sqlite
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
- build_target: linux64_nowallet
|
- build_target: linux64_nowallet
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
|
image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
|
||||||
options: --user root
|
options: --user root
|
||||||
@ -146,16 +146,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: Download built depends
|
||||||
- name: Restore Cache dependencies
|
uses: actions/download-artifact@v4
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
with:
|
||||||
path: |
|
name: depends-${{ matrix.depends_on }}
|
||||||
depends/${{ matrix.host }}
|
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: Determine PR Base SHA
|
- name: Determine PR Base SHA
|
||||||
id: vars
|
id: vars
|
||||||
@ -192,32 +187,3 @@ jobs:
|
|||||||
name: build-artifacts-${{ matrix.build_target }}
|
name: build-artifacts-${{ matrix.build_target }}
|
||||||
path: |
|
path: |
|
||||||
/output
|
/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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user