-
Notifications
You must be signed in to change notification settings - Fork 10
185 lines (179 loc) · 5.92 KB
/
Copy pathbuild.yml
File metadata and controls
185 lines (179 loc) · 5.92 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
174
175
176
177
178
179
180
181
182
183
184
185
name: .NET
on:
push:
branches: [ "*" ]
tags:
- v*
jobs:
build-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix tags
if: startsWith(github.ref, 'refs/tags/v')
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Package Examples
run: |
pushd bin/Release
./tap python pack-template-project --dir ../../OpenTap.Python.ProjectTemplate/ --out Packages/Python/OpenTap.Python.ProjectTemplate.zip --verbose
# Update OpenTAP so plugin types will be serialized into package xml files
./tap package install OpenTAP --version 9.23.0
./tap package create ../../Python.Build/package.xml --install
./tap package create ../../OpenTap.Python.Examples/package.xml
popd
- name: Test
run: ./bin/Release/tap python test
- name: Test Plan
run: |
pip install numpy
./bin/Release/tap run bin/Release/test.TapPlan --non-interactive
- name: Test Project Creation
run: |
# Copy packages to cache.
cp bin/Release/Python*.TapPackage ~/.local/share/OpenTap/PackageCache
./bin/Release/tap python new-project --directory /tmp/MyProject/Test2 --project-name Test2 --verbose
pushd /tmp/MyProject/Test2
dotnet build
bin/tap package create ./package.xml
popd
- name: Upload binaries
if: matrix.os == 'ubuntu-24.04'
uses: actions/upload-artifact@v4
with:
name: TapPackage
retention-days: 14
path: |
bin/Release/Python*.TapPackage
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: ./bin/Debug/tap python test
- name: Test Plan
run: |
pip install numpy
./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive
test-macos:
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: |
./bin/Debug/tap python set-path $Python3_ROOT_DIR
./bin/Debug/tap python set-lib-path $Python3_ROOT_DIR/lib/libpython3.13.dylib
./bin/Debug/tap python test
- name: Test Plan
run: |
pip install numpy
./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive
test-alpine:
runs-on: ubuntu-latest
container:
image: alpine:3.21
steps:
- name: Install dependencies
run: |
apk add --no-cache \
bash git python3 python3-dev py3-pip py3-numpy \
dotnet-sdk-8.0 \
icu-libs
- name: Checkout
uses: actions/checkout@v4
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: ./bin/Debug/tap python test
- name: Test Plan
run: ./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive
publish-package:
if: github.ref == 'refs/heads/dev' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
environment: packages.opentap.io
runs-on: ubuntu-latest
needs:
- build-ubuntu
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: TapPackage
path: ./
- name: Setup OpenTAP
uses: opentap/setup-opentap@v1.0
with:
version: 9.18.4
- name: Test Install
run: tap package install ./Python.*.TapPackage
- name: Install PackagePublish
run: tap package install -f PackagePublish --version 3.0.0+efea95ee
- name: Publish
run: |
tap package publish -r http://packages.opentap.io -k ${{ secrets.REPO_PASS }} Python.*.TapPackage
tap package publish -r http://packages.opentap.io -k ${{ secrets.REPO_PASS2 }} PythonExamples.*.TapPackage
build-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pages Cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm install
working-directory: Documentation/TAP_Python_Help
- name: Build
run: npm run build
env:
# Newer versions of ssl no longer supports the hashing used by vuepress(webpack).
NODE_OPTIONS: --openssl-legacy-provider
working-directory: Documentation/TAP_Python_Help
- name: Upload Docs
uses: actions/upload-artifact@v4
with:
name: Pages
retention-days: 14
path: |
public
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/dev' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
with:
publish_dir: public
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: pages