-
Notifications
You must be signed in to change notification settings - Fork 0
173 lines (130 loc) · 4.13 KB
/
Copy pathci.yml
File metadata and controls
173 lines (130 loc) · 4.13 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: CI
on:
push:
branches:
- main
- master
pull_request:
permissions:
contents: read
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
format-and-unit:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore local tools
run: dotnet tool restore
- name: Restore solution
run: dotnet restore CodecMapper.sln --nologo
- name: Check formatting
run: bash scripts/format-check.sh
- name: Run test suite
run: dotnet test tests/CodecMapper.Tests/CodecMapper.Tests.fsproj --nologo -v minimal
compat:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore local tools
run: dotnet tool restore
- name: Restore solution
run: dotnet restore CodecMapper.sln --nologo
- name: Run AOT sentinel
run: dotnet run --project tests/CodecMapper.AotTests/CodecMapper.AotTests.fsproj --nologo
- name: Run Fable sentinel
run: dotnet run --project tests/CodecMapper.FableTests/CodecMapper.FableTests.fsproj --nologo
fable-transpile:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore local tools
run: dotnet tool restore
- name: Restore solution
run: dotnet restore CodecMapper.sln --nologo
- name: Check Fable transpilation
run: bash scripts/check-fable-compat.sh
- name: Check Fable 5 transpilation
run: bash scripts/check-fable5-compat.sh
fable-package:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore local tools
run: dotnet tool restore
- name: Restore solution
run: dotnet restore CodecMapper.sln --nologo
- name: Check packaged Fable transpilation
run: bash scripts/check-fable-package-compat.sh
- name: Check packaged Fable 5 transpilation
run: bash scripts/check-fable5-package-compat.sh
docs-and-bench:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore local tools
run: dotnet tool restore
- name: Restore solution
run: dotnet restore CodecMapper.sln --nologo
- name: Validate benchmark snapshot generator
run: bash scripts/generate-benchmark-snapshot.sh --stdout-only
- name: Build API docs
run: bash scripts/generate-api-docs.sh
- name: Prepare Pages artifact
run: touch output/.nojekyll
- name: Upload generated docs artifact
uses: actions/upload-artifact@v4
with:
name: api-docs
path: output/
if-no-files-found: error
- name: Upload Pages artifact
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
uses: actions/upload-pages-artifact@v3
with:
path: output/
deploy-pages:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
needs:
- format-and-unit
- compat
- fable-transpile
- fable-package
- docs-and-bench
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4