Skip to content

Commit 84c2265

Browse files
committed
MWE custom vs default runner
1 parent 1cb9c1a commit 84c2265

File tree

5 files changed

+240
-0
lines changed

5 files changed

+240
-0
lines changed
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# This workflow showcases feature differences between
2+
# GitHub's default runner (actions/runner)
3+
# and
4+
# Antmicro's custom runner (antmicro/runner).
5+
6+
name: MWE custom vs default runner
7+
8+
on:
9+
push:
10+
pull_request:
11+
12+
jobs:
13+
14+
15+
# Supported on both actions/runner and antmicro/runner
16+
17+
# Non-local Composite Actions
18+
19+
Supported-Composite-Custom:
20+
container: ubuntu:bionic
21+
runs-on:
22+
- self-hosted
23+
- Linux
24+
- X64
25+
26+
env:
27+
MAX_CORES: 80
28+
GHA_EXTERNAL_DISK: "tools"
29+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
30+
31+
steps:
32+
33+
- uses: antmicro/f4pga-arch-defs/composite@umarcor/runner/mwes
34+
35+
Supported-Composite-Default:
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
40+
- uses: antmicro/f4pga-arch-defs/composite@umarcor/runner/mwes
41+
42+
# Actions inside Composite Actions
43+
44+
Supported-CompositeUses-Custom:
45+
container: ubuntu:bionic
46+
runs-on:
47+
- self-hosted
48+
- Linux
49+
- X64
50+
51+
env:
52+
MAX_CORES: 80
53+
GHA_EXTERNAL_DISK: "tools"
54+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
55+
56+
steps:
57+
58+
- uses: antmicro/f4pga-arch-defs/composite-uses@umarcor/runner/mwes
59+
60+
Supported-CompositeUses-Default:
61+
runs-on: ubuntu-latest
62+
63+
steps:
64+
65+
- uses: antmicro/f4pga-arch-defs/composite-uses@umarcor/runner/mwes
66+
67+
# Local Composite Actions
68+
69+
Supported-CompositeLocal-Custom:
70+
container: ubuntu:bionic
71+
runs-on:
72+
- self-hosted
73+
- Linux
74+
- X64
75+
76+
env:
77+
MAX_CORES: 80
78+
GHA_EXTERNAL_DISK: "tools"
79+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
80+
81+
steps:
82+
83+
- uses: actions/checkout@v3
84+
- uses: ./composite
85+
86+
Supported-CompositeLocal-Default:
87+
runs-on: ubuntu-latest
88+
89+
steps:
90+
91+
- uses: actions/checkout@v3
92+
- uses: ./composite
93+
94+
# Supported on actions/runner but not on antmicro/runner
95+
96+
# Conditional Action inside Composite Actions
97+
98+
CompositeIf-Custom:
99+
container: ubuntu:bionic
100+
runs-on:
101+
- self-hosted
102+
- Linux
103+
- X64
104+
105+
env:
106+
MAX_CORES: 80
107+
GHA_EXTERNAL_DISK: "tools"
108+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
109+
110+
steps:
111+
112+
- uses: actions/checkout@v3
113+
- uses: ./composite-if
114+
115+
CompositeIf-Default:
116+
runs-on: ubuntu-latest
117+
118+
steps:
119+
120+
- uses: actions/checkout@v3
121+
- uses: ./composite-if
122+
123+
# Action actions/setup-python
124+
125+
SetupPython-Custom:
126+
container: ubuntu:bionic
127+
runs-on:
128+
- self-hosted
129+
- Linux
130+
- X64
131+
132+
env:
133+
MAX_CORES: 80
134+
GHA_EXTERNAL_DISK: "tools"
135+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
136+
137+
steps:
138+
139+
- name: '🐍 Setup Python'
140+
uses: actions/setup-python@v4
141+
with:
142+
python-version: '3.10'
143+
144+
SetupPython-Default:
145+
runs-on: ubuntu-latest
146+
147+
steps:
148+
149+
- name: '🐍 Setup Python'
150+
uses: actions/setup-python@v4
151+
with:
152+
python-version: '3.10'
153+
154+
# Docker steps
155+
156+
DockerStep-Custom:
157+
container: ubuntu:bionic
158+
runs-on:
159+
- self-hosted
160+
- Linux
161+
- X64
162+
163+
env:
164+
MAX_CORES: 80
165+
GHA_EXTERNAL_DISK: "tools"
166+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
167+
168+
steps:
169+
170+
- uses: docker://debian:bullseye-slim
171+
with:
172+
args: echo 'Hello world!'
173+
174+
DockerStep-Default:
175+
runs-on: ubuntu-latest
176+
177+
steps:
178+
179+
- uses: docker://debian:bullseye-slim
180+
with:
181+
args: echo 'Hello world!'
182+
183+
# Execute `docker` commands
184+
185+
DockerManual-Custom:
186+
container: ubuntu:bionic
187+
runs-on:
188+
- self-hosted
189+
- Linux
190+
- X64
191+
192+
env:
193+
MAX_CORES: 80
194+
GHA_EXTERNAL_DISK: "tools"
195+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
196+
197+
steps:
198+
199+
- run: docker pull debian:bullseye-slim
200+
201+
DockerManual-Default:
202+
runs-on: ubuntu-latest
203+
204+
steps:
205+
206+
- run: docker pull debian:bullseye-slim
207+
208+
209+
210+
211+

composite-if/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'Conditional Action inside Composite Action'
2+
description: 'For testing purposes'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
7+
- uses: actions/checkout@v3
8+
9+
- if: ${{ always() }}
10+
shell: bash
11+
run: echo 'Test'

composite-uses/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: 'Action inside Composite Action'
2+
description: 'For testing purposes'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
7+
- uses: actions/checkout@v3

composite/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: 'Composite Action'
2+
description: 'For testing purposes'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
7+
- shell: bash
8+
run: '''${{ github.action_path }}/script.sh'''

composite/script.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
echo "Hello world!"

0 commit comments

Comments
 (0)