Skip to content

Commit

Permalink
improvement(ci): improve ci daily workflows (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrsantos authored Dec 18, 2023
1 parent d2c98bd commit e3c967a
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Legacy Platforms
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
uses: ./.github/workflows/daily_common.yml
with:
nim-branch: "['version-1-6','version-2-0']"
platform: "[{'os':'linux','cpu':'i386'}]"


cpu: "['amd64']"
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/daily_i386.yml
Original file line number Diff line number Diff line change
@@ -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'}}]"
12 changes: 12 additions & 0 deletions .github/workflows/daily_nim_devel.yml
Original file line number Diff line number Diff line change
@@ -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']"
15 changes: 0 additions & 15 deletions .github/workflows/multi_nim.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/multi_nim_devel.yml

This file was deleted.

0 comments on commit e3c967a

Please sign in to comment.