diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml index 54ee11560..a5a5f820a 100644 --- a/.github/workflows/ci-expanded.yml +++ b/.github/workflows/ci-expanded.yml @@ -7,7 +7,8 @@ name: Expanded Continuous Integration -on: [ workflow_dispatch ] +on: + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.repository_owner == 'libbitcoin' && (github.event.pull_request.number || github.run_id) || github.ref }} @@ -34,6 +35,8 @@ jobs: gnu: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -422,6 +425,7 @@ jobs: fi - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -430,13 +434,23 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: bash + run: | + rm -rf ${{ github.workspace }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 path: 'libbitcoin-database' repository: ${{ github.repository }} + - name: Prepare toolchain [linux] if: ${{ startsWith(matrix.image, 'ubuntu') }} shell: bash @@ -542,6 +556,8 @@ jobs: if-no-files-found: warn cmake: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -930,6 +946,7 @@ jobs: fi - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -938,13 +955,23 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: bash + run: | + rm -rf ${{ github.workspace }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 path: 'libbitcoin-database' repository: ${{ github.repository }} + - name: Prepare toolchain [linux] if: ${{ startsWith(matrix.image, 'ubuntu') }} shell: bash @@ -1050,6 +1077,8 @@ jobs: if-no-files-found: warn presets: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -1366,6 +1395,7 @@ jobs: fi - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -1374,13 +1404,23 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: bash + run: | + rm -rf ${{ github.workspace }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 path: 'libbitcoin-database' repository: ${{ github.repository }} + - name: Prepare toolchain [linux] if: ${{ startsWith(matrix.image, 'ubuntu') }} shell: bash @@ -1481,6 +1521,8 @@ jobs: if-no-files-found: warn msvc: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -1529,6 +1571,7 @@ jobs: msbuild-architecture: x64 - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -1537,7 +1580,15 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: powershell + run: | + Remove-Item -Path ${{ github.workspace }}\libbitcoin-system -Recurse -Force -ErrorAction SilentlyContinue + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 108a7839b..6d5c1785c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,11 @@ name: Continuous Integration -on: [ pull_request, push, workflow_dispatch ] +on: + pull_request: + types: [opened, synchronize, reopened, closed] + push: + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.repository_owner == 'libbitcoin' && (github.event.pull_request.number || github.run_id) || github.ref }} @@ -34,6 +38,8 @@ jobs: gnu: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -115,6 +121,7 @@ jobs: fi - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -123,13 +130,23 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: bash + run: | + rm -rf ${{ github.workspace }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 path: 'libbitcoin-database' repository: ${{ github.repository }} + - name: Prepare toolchain [linux] if: ${{ startsWith(matrix.image, 'ubuntu') }} shell: bash @@ -235,6 +252,8 @@ jobs: if-no-files-found: warn cmake: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -316,6 +335,7 @@ jobs: fi - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -324,13 +344,23 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: bash + run: | + rm -rf ${{ github.workspace }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 path: 'libbitcoin-database' repository: ${{ github.repository }} + - name: Prepare toolchain [linux] if: ${{ startsWith(matrix.image, 'ubuntu') }} shell: bash @@ -436,6 +466,8 @@ jobs: if-no-files-found: warn presets: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -480,6 +512,7 @@ jobs: fi - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -488,13 +521,23 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: bash + run: | + rm -rf ${{ github.workspace }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 path: 'libbitcoin-database' repository: ${{ github.repository }} + - name: Prepare toolchain [linux] if: ${{ startsWith(matrix.image, 'ubuntu') }} shell: bash @@ -595,6 +638,8 @@ jobs: if-no-files-found: warn msvc: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + strategy: fail-fast: false @@ -631,6 +676,7 @@ jobs: msbuild-architecture: x64 - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system continue-on-error: true uses: actions/checkout@v6 with: @@ -639,7 +685,15 @@ jobs: ref: ${{ steps.get-branch.outputs.branch }} repository: ${{ github.repository_owner }}/libbitcoin-system + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: powershell + run: | + Remove-Item -Path ${{ github.workspace }}\libbitcoin-system -Recurse -Force -ErrorAction SilentlyContinue + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database uses: actions/checkout@v6 with: fetch-depth: 1 diff --git a/.gitignore b/.gitignore index 2b1f770f1..2427ca2ce 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,11 @@ # python bytecode *.pyc +# store +*.bin +*.head +*.data + # gnu .deps Makefile