From e3c967ad1939fb33b8e13759037d193734acd202 Mon Sep 17 00:00:00 2001 From: diegomrsantos Date: Mon, 18 Dec 2023 20:14:33 +0100 Subject: [PATCH] improvement(ci): improve ci daily workflows (#1002) --- .../{multi_nim_legacy.yml => daily.yml} | 8 ++-- ...{multi_nim_common.yml => daily_common.yml} | 39 ++++++++++--------- .github/workflows/daily_i386.yml | 13 +++++++ .github/workflows/daily_nim_devel.yml | 12 ++++++ .github/workflows/multi_nim.yml | 15 ------- .github/workflows/multi_nim_devel.yml | 13 ------- 6 files changed, 49 insertions(+), 51 deletions(-) rename .github/workflows/{multi_nim_legacy.yml => daily.yml} (50%) rename .github/workflows/{multi_nim_common.yml => daily_common.yml} (69%) create mode 100644 .github/workflows/daily_i386.yml create mode 100644 .github/workflows/daily_nim_devel.yml delete mode 100644 .github/workflows/multi_nim.yml delete mode 100644 .github/workflows/multi_nim_devel.yml diff --git a/.github/workflows/multi_nim_legacy.yml b/.github/workflows/daily.yml similarity index 50% rename from .github/workflows/multi_nim_legacy.yml rename to .github/workflows/daily.yml index 24266284a..572b0e554 100644 --- a/.github/workflows/multi_nim_legacy.yml +++ b/.github/workflows/daily.yml @@ -1,4 +1,4 @@ -name: Legacy Platforms +name: Daily on: schedule: - cron: "30 6 * * *" @@ -6,9 +6,7 @@ on: jobs: call-multi-nim-common: - uses: status-im/nim-libp2p/.github/workflows/multi_nim_common.yml@unstable + uses: ./.github/workflows/daily_common.yml with: nim-branch: "['version-1-6','version-2-0']" - platform: "[{'os':'linux','cpu':'i386'}]" - - + cpu: "['amd64']" diff --git a/.github/workflows/multi_nim_common.yml b/.github/workflows/daily_common.yml similarity index 69% rename from .github/workflows/multi_nim_common.yml rename to .github/workflows/daily_common.yml index acf1678b6..ba7ee6ce9 100644 --- a/.github/workflows/multi_nim_common.yml +++ b/.github/workflows/daily_common.yml @@ -7,10 +7,15 @@ on: description: 'Nim branch' required: true type: string - platform: - description: 'Platform' + cpu: + description: 'CPU' required: true type: string + exclude: + description: 'Exclude matrix configurations' + required: false + type: string + default: "[]" jobs: delete-cache: @@ -24,28 +29,26 @@ jobs: strategy: fail-fast: false matrix: - target: ${{ fromJSON(inputs.platform) }} - branch: ${{ fromJSON(inputs.nim-branch) }} - include: - - target: - os: linux - builder: ubuntu-20.04 + platform: + - os: linux + builder: ubuntu-20 shell: bash - - target: - os: macos + - os: macos builder: macos-12 shell: bash - - target: - os: windows + - os: windows builder: windows-2019 shell: msys2 {0} + branch: ${{ fromJSON(inputs.nim-branch) }} + cpu: ${{ fromJSON(inputs.cpu) }} + exclude: ${{ fromJSON(inputs.exclude) }} defaults: run: - shell: ${{ matrix.shell }} + shell: ${{ matrix.platform.shell }} - name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})' - runs-on: ${{ matrix.builder }} + name: '${{ matrix.platform.os }}-${{ matrix.cpu }} (Nim ${{ matrix.branch }})' + runs-on: ${{ matrix.platform.builder }} continue-on-error: ${{ matrix.branch == 'devel' || matrix.branch == 'version-2-0' }} steps: - name: Checkout @@ -54,10 +57,10 @@ jobs: - name: Setup Nim uses: "./.github/actions/install_nim" with: - os: ${{ matrix.target.os }} - shell: ${{ matrix.shell }} + os: ${{ matrix.platform.os }} + shell: ${{ matrix.platform.shell }} nim_branch: ${{ matrix.branch }} - cpu: ${{ matrix.target.cpu }} + cpu: ${{ matrix.cpu }} - name: Setup Go uses: actions/setup-go@v4 diff --git a/.github/workflows/daily_i386.yml b/.github/workflows/daily_i386.yml new file mode 100644 index 000000000..23aa07597 --- /dev/null +++ b/.github/workflows/daily_i386.yml @@ -0,0 +1,13 @@ +name: Daily i386 +on: + schedule: + - cron: "30 6 * * *" + workflow_dispatch: + +jobs: + call-multi-nim-common: + uses: ./.github/workflows/daily_common.yml + with: + nim-branch: "['version-1-6','version-2-0', 'devel']" + cpu: "['i386']" + exclude: "[{'platform': {'os':'macos'}}, {'platform': {'os':'windows'}}]" diff --git a/.github/workflows/daily_nim_devel.yml b/.github/workflows/daily_nim_devel.yml new file mode 100644 index 000000000..d27ae5f1e --- /dev/null +++ b/.github/workflows/daily_nim_devel.yml @@ -0,0 +1,12 @@ +name: Daily Nim Devel +on: + schedule: + - cron: "30 6 * * *" + workflow_dispatch: + +jobs: + call-multi-nim-common: + uses: ./.github/workflows/daily_common.yml + with: + nim-branch: "['devel']" + cpu: "['amd64']" diff --git a/.github/workflows/multi_nim.yml b/.github/workflows/multi_nim.yml deleted file mode 100644 index c51dd379d..000000000 --- a/.github/workflows/multi_nim.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Daily -on: - schedule: - - cron: "30 6 * * *" - workflow_dispatch: - -jobs: - call-multi-nim-common: - uses: status-im/nim-libp2p/.github/workflows/multi_nim_common.yml@unstable - with: - nim-branch: "['version-1-6','version-2-0']" - platform: "[{'os':'linux','cpu':'amd64'},{'os':'macos','cpu':'amd64'},{'os':'windows','cpu':'amd64'}]" - - - diff --git a/.github/workflows/multi_nim_devel.yml b/.github/workflows/multi_nim_devel.yml deleted file mode 100644 index 4acc46cae..000000000 --- a/.github/workflows/multi_nim_devel.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Nim Devel -on: - schedule: - - cron: "30 6 * * *" - workflow_dispatch: - -jobs: - call-multi-nim-common: - uses: status-im/nim-libp2p/.github/workflows/multi_nim_common.yml@unstable - with: - nim-branch: "['devel']" - platform: "[{'os':'linux','cpu':'amd64'},{'os':'macos','cpu':'amd64'},{'os':'windows','cpu':'amd64'}]" -