-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 2.5 KB
/
manual-matrix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Manual workflow (matrix)
on:
workflow_dispatch:
inputs:
name:
description: 'Person to greet'
default: 'World'
required: true
jobs:
greet:
strategy:
matrix:
os: [ ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, windows-2022, windows-2019, macos-latest, macos-11, macos-12, macos-13, macos-14 ]
# os: [ ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, windows-2022, windows-2019, macos-latest, macos-latest-large, macos-latest-xlarge, macos-11, macos-12, macos-12-large, macos-13, macos-13-large, macos-13-xlarge, macos-14, macos-14-large, macos-14-xlarge ]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Display OS info
id: display
run: |
OS_INFO=$(python -c "import platform; print(f'OS: {platform.system()}')")
RELEASE_INFO=$(python -c "import platform; print(f'Release: {platform.release()}')")
VERSION_INFO=$(python -c "import platform; print(f'Version: {platform.version()}')")
MACHINE_INFO=$(python -c "import platform; print(f'Machine: {platform.machine()}')")
PROCESSOR_INFO=$(python -c "import platform; print(f'Processor: {platform.processor()}')")
echo "os-info=$OS_INFO" >> "$GITHUB_OUTPUT"
echo "release-info=$RELEASE_INFO" >> "$GITHUB_OUTPUT"
echo "version-info=$VERSION_INFO" >> "$GITHUB_OUTPUT"
echo "machine-info=$MACHINE_INFO" >> "$GITHUB_OUTPUT"
echo "processor-info=$PROCESSOR_INFO" >> "$GITHUB_OUTPUT"
- name: Summary
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
import * as core from '@actions/core'
await core.summary
.addHeading('OS Information')
.addCodeBlock(generateTestResults(), "js")
.addTable([
[{data: 'Runner', header: true}, {data: 'OS', header: true}, {data: 'Release', header: true}, {data: 'Version', header: true}, {data: 'Machine', header: true}, {data: 'Processor', header: true}],
['${{ matrix.os }}', '${{ steps.display.outputs.os-info }}', '${{ steps.display.outputs.release-info }}', ${{ steps.display.outputs.version-info }}, ${{ steps.display.outputs.machine-info }}, ${{ steps.display.outputs.processor-info }}]
])
.write()