Repository navigation
120 lines (103 loc) · 3.2 KB
/
Copy pathmain.yml
File metadata and controls
120 lines (103 loc) · 3.2 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: CI
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
# Prerequisites
- name: Install tools
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -yq install dos2unix
- uses: actions/checkout@v6
with:
submodules: true
# Setup .NET
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
# CI debug information
- name: Version Information
run: dotnet --info
# Build & package
- name: Build
run: pwsh make.ps1
- name: Package
run: pwsh make.ps1 package
# Upload package
- uses: actions/upload-artifact@v7
with:
name: packages-${{ matrix.os }}
path: dist/Release/Packages
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
framework: ['net462', 'net8.0', 'net10.0']
stdlib: ['3.4', '3.6']
name: test (${{ matrix.os }}, ${{ matrix.framework }}, ${{ matrix.stdlib }})
steps:
# Prerequisites
- uses: actions/checkout@v6
with:
submodules: true
# Retarget to a different Python version by switching the StdLib branch
- name: Checkout StdLib ${{ matrix.stdlib }}
if: matrix.stdlib != '3.4'
run: |
git -C src/core/IronPython.StdLib fetch --depth 1 origin ${{ matrix.stdlib }}
git -C src/core/IronPython.StdLib checkout FETCH_HEAD
# Setup .NET
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Setup .NET 8.0
if: matrix.framework == 'net8.0'
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'
# Setup Mono (the runner images no longer include it)
- name: Install Mono
if: matrix.os != 'windows-latest' && matrix.framework == 'net462'
run: |
if [ "$RUNNER_OS" = Linux ]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "$HOMEBREW_PREFIX/bin" >> "$GITHUB_PATH"
fi
brew install mono
# Build & Test
- name: Build
run: pwsh make.ps1
- name: NGen
if: matrix.os == 'windows-latest' && matrix.framework == 'net462'
run: ./make.ps1 ngen
shell: pwsh
- name: ReadyToRun
if: matrix.framework != 'net462'
run: ./make.ps1 -frameworks ${{ matrix.framework }} readytorun
shell: pwsh
- name: Version Information (${{ matrix.framework }})
run: |
$ipy = "bin/Release/${{ matrix.framework }}/ipy"
if ('${{ matrix.framework }}' -ne 'net462') { dotnet "$ipy.dll" -VV }
elseif ('${{ matrix.os }}' -eq 'windows-latest') { & "$ipy.exe" -VV }
else {
mono --version
mono "$ipy.exe" -VV
}
shell: pwsh
- name: Test (${{ matrix.framework }})
run: ./make.ps1 -frameworks ${{ matrix.framework }} test-all
shell: pwsh