-
Notifications
You must be signed in to change notification settings - Fork 9
192 lines (178 loc) · 6.74 KB
/
semantic.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
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
186
187
188
189
190
191
192
name: Semantic
on:
schedule:
- cron: '0 0 * * SUN'
workflow_dispatch:
inputs:
filterResults:
description: 'What comparator results the generators should print'
required: false
default: 'failures'
type: choice
options:
- all
- failures
- successes
pull_request:
paths:
- '.github/workflows/semantic.yml'
- 'generators/**'
# Restrict jobs in this workflow to have no permissions by default; permissions
# should be granted per job as needed using a dedicated `permissions` block
permissions: {}
env:
VERSION_GENERATOR_PRINT: ${{ inputs.filterResults }}
jobs:
generate-debian-versions:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: /tmp/debian-versions-generator-cache.csv
key: ${{ runner.os }}-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.10'
- run: dpkg --version
- run: python3 generators/generate-debian-versions.py
- run: git status
- run: stat debian-db.zip
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: generated-debian-versions
path: pkg/semantic/fixtures/debian-versions-generated.txt
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: /tmp/debian-versions-generator-cache.csv
key: ${{ runner.os }}-${{ hashFiles('debian-db.zip') }}
generate-packagist-versions:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
with:
php-version: '8.2'
extensions: zip
- run: php generators/generate-packagist-versions.php
- run: git status
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: generated-packagist-versions
path: pkg/semantic/fixtures/packagist-versions-generated.txt
generate-pypi-versions:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.10'
- name: setup dependencies
run: pip install packaging==21.3
- run: python3 generators/generate-pypi-versions.py
- run: git status
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: generated-pypi-versions
path: pkg/semantic/fixtures/pypi-versions-generated.txt
generate-rubygems-versions:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: ruby/setup-ruby@401c19e14f474b54450cd3905bb8b86e2c8509cf # v1.204.0
with:
ruby-version: '3.1'
- name: setup dependencies
run: gem install rubyzip
- run: ruby generators/generate-rubygems-versions.rb
- run: git status
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: generated-rubygems-versions
path: pkg/semantic/fixtures/rubygems-versions-generated.txt
generate-maven-versions:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
java-version: 17
distribution: oracle
- name: setup dependencies
run: |
mkdir -p generators/lib
curl https://repo1.maven.org/maven2/org/json/json/20220924/json-20220924.jar \
-o generators/lib/json-20220924.jar
curl https://repo1.maven.org/maven2/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar \
-o generators/lib/maven-artifact-3.8.5.jar
- run: java -cp 'generators/lib/*' generators/GenerateMavenVersions.java
- run: git status
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: generated-maven-versions
path: pkg/semantic/fixtures/maven-versions-generated.txt
generate-cran-versions:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: r-lib/actions/setup-r@473c68190595b311a74f208fba61a8d8c0d4c247 # v2.11.1
with:
r-version: '3.5.3'
- run: Rscript generators/generate-cran-versions.R
- run: git status
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: generated-cran-versions
path: pkg/semantic/fixtures/cran-versions-generated.txt
test-semantic:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
needs:
- generate-debian-versions
- generate-packagist-versions
- generate-pypi-versions
- generate-rubygems-versions
- generate-maven-versions
- generate-cran-versions
if: always()
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: .go-version
cache: true
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: generated-*-versions
path: pkg/semantic/fixtures/
merge-multiple: true
- run: git status
- run: make test