Skip to content

Commit 4486b46

Browse files
committed
MWE custom vs default runner
1 parent e658f28 commit 4486b46

File tree

5 files changed

+241
-0
lines changed

5 files changed

+241
-0
lines changed
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
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+
# Conditional Action inside Composite Actions
95+
96+
Supported-CompositeIf-Custom:
97+
container: ubuntu:bionic
98+
runs-on:
99+
- self-hosted
100+
- Linux
101+
- X64
102+
103+
env:
104+
MAX_CORES: 80
105+
GHA_EXTERNAL_DISK: "tools"
106+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
107+
108+
steps:
109+
110+
- uses: actions/checkout@v3
111+
- uses: ./composite-if
112+
113+
Supported-CompositeIf-Default:
114+
runs-on: ubuntu-latest
115+
116+
steps:
117+
118+
- uses: actions/checkout@v3
119+
- uses: ./composite-if
120+
121+
122+
# Supported on actions/runner but not on antmicro/runner
123+
124+
# Action actions/setup-python
125+
126+
SetupPython-Custom:
127+
container: ubuntu:bionic
128+
runs-on:
129+
- self-hosted
130+
- Linux
131+
- X64
132+
133+
env:
134+
MAX_CORES: 80
135+
GHA_EXTERNAL_DISK: "tools"
136+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
137+
138+
steps:
139+
140+
- name: '🐍 Setup Python'
141+
uses: actions/setup-python@v4
142+
with:
143+
python-version: '3.10'
144+
145+
SetupPython-Default:
146+
runs-on: ubuntu-latest
147+
148+
steps:
149+
150+
- name: '🐍 Setup Python'
151+
uses: actions/setup-python@v4
152+
with:
153+
python-version: '3.10'
154+
155+
# Docker steps
156+
157+
DockerStep-Custom:
158+
container: ubuntu:bionic
159+
runs-on:
160+
- self-hosted
161+
- Linux
162+
- X64
163+
164+
env:
165+
MAX_CORES: 80
166+
GHA_EXTERNAL_DISK: "tools"
167+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
168+
169+
steps:
170+
171+
- uses: docker://debian:bullseye-slim
172+
with:
173+
args: echo 'Hello world!'
174+
175+
DockerStep-Default:
176+
runs-on: ubuntu-latest
177+
178+
steps:
179+
180+
- uses: docker://debian:bullseye-slim
181+
with:
182+
args: echo 'Hello world!'
183+
184+
# Execute `docker` commands
185+
186+
DockerManual-Custom:
187+
container: ubuntu:bionic
188+
runs-on:
189+
- self-hosted
190+
- Linux
191+
- X64
192+
193+
env:
194+
MAX_CORES: 80
195+
GHA_EXTERNAL_DISK: "tools"
196+
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
197+
198+
steps:
199+
200+
- run: docker pull debian:bullseye-slim
201+
202+
DockerManual-Default:
203+
runs-on: ubuntu-latest
204+
205+
steps:
206+
207+
- run: docker pull debian:bullseye-slim
208+
209+
210+
211+
212+

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)