Skip to content

Commit e3c967a

Browse files
improvement(ci): improve ci daily workflows (vacp2p#1002)
1 parent d2c98bd commit e3c967a

File tree

6 files changed

+49
-51
lines changed

6 files changed

+49
-51
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
name: Legacy Platforms
1+
name: Daily
22
on:
33
schedule:
44
- cron: "30 6 * * *"
55
workflow_dispatch:
66

77
jobs:
88
call-multi-nim-common:
9-
uses: status-im/nim-libp2p/.github/workflows/multi_nim_common.yml@unstable
9+
uses: ./.github/workflows/daily_common.yml
1010
with:
1111
nim-branch: "['version-1-6','version-2-0']"
12-
platform: "[{'os':'linux','cpu':'i386'}]"
13-
14-
12+
cpu: "['amd64']"

.github/workflows/multi_nim_common.yml renamed to .github/workflows/daily_common.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ on:
77
description: 'Nim branch'
88
required: true
99
type: string
10-
platform:
11-
description: 'Platform'
10+
cpu:
11+
description: 'CPU'
1212
required: true
1313
type: string
14+
exclude:
15+
description: 'Exclude matrix configurations'
16+
required: false
17+
type: string
18+
default: "[]"
1419

1520
jobs:
1621
delete-cache:
@@ -24,28 +29,26 @@ jobs:
2429
strategy:
2530
fail-fast: false
2631
matrix:
27-
target: ${{ fromJSON(inputs.platform) }}
28-
branch: ${{ fromJSON(inputs.nim-branch) }}
29-
include:
30-
- target:
31-
os: linux
32-
builder: ubuntu-20.04
32+
platform:
33+
- os: linux
34+
builder: ubuntu-20
3335
shell: bash
34-
- target:
35-
os: macos
36+
- os: macos
3637
builder: macos-12
3738
shell: bash
38-
- target:
39-
os: windows
39+
- os: windows
4040
builder: windows-2019
4141
shell: msys2 {0}
42+
branch: ${{ fromJSON(inputs.nim-branch) }}
43+
cpu: ${{ fromJSON(inputs.cpu) }}
44+
exclude: ${{ fromJSON(inputs.exclude) }}
4245

4346
defaults:
4447
run:
45-
shell: ${{ matrix.shell }}
48+
shell: ${{ matrix.platform.shell }}
4649

47-
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})'
48-
runs-on: ${{ matrix.builder }}
50+
name: '${{ matrix.platform.os }}-${{ matrix.cpu }} (Nim ${{ matrix.branch }})'
51+
runs-on: ${{ matrix.platform.builder }}
4952
continue-on-error: ${{ matrix.branch == 'devel' || matrix.branch == 'version-2-0' }}
5053
steps:
5154
- name: Checkout
@@ -54,10 +57,10 @@ jobs:
5457
- name: Setup Nim
5558
uses: "./.github/actions/install_nim"
5659
with:
57-
os: ${{ matrix.target.os }}
58-
shell: ${{ matrix.shell }}
60+
os: ${{ matrix.platform.os }}
61+
shell: ${{ matrix.platform.shell }}
5962
nim_branch: ${{ matrix.branch }}
60-
cpu: ${{ matrix.target.cpu }}
63+
cpu: ${{ matrix.cpu }}
6164

6265
- name: Setup Go
6366
uses: actions/setup-go@v4

.github/workflows/daily_i386.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Daily i386
2+
on:
3+
schedule:
4+
- cron: "30 6 * * *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
call-multi-nim-common:
9+
uses: ./.github/workflows/daily_common.yml
10+
with:
11+
nim-branch: "['version-1-6','version-2-0', 'devel']"
12+
cpu: "['i386']"
13+
exclude: "[{'platform': {'os':'macos'}}, {'platform': {'os':'windows'}}]"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Daily Nim Devel
2+
on:
3+
schedule:
4+
- cron: "30 6 * * *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
call-multi-nim-common:
9+
uses: ./.github/workflows/daily_common.yml
10+
with:
11+
nim-branch: "['devel']"
12+
cpu: "['amd64']"

.github/workflows/multi_nim.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/multi_nim_devel.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)