Skip to content

Commit b10372d

Browse files
committed
Include swift & tool verification in CI workflow
Signed-off-by: HS <[email protected]>
1 parent 592ccc4 commit b10372d

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/hosted.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ jobs:
6969
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
7070
7171
if "${{ matrix.compiler }}" EQU "cl" (
72+
set CC=cl
73+
set CXX=cl
7274
echo 'CC=cl' >> $GITHUB_ENV
7375
echo 'CXX=cl' >> $GITHUB_ENV
7476
) else (
77+
set CC=clang
78+
set CXX=clang++
7579
echo 'CC=clang' >> $GITHUB_ENV
7680
echo 'CXX=clang++' >> $GITHUB_ENV
7781
)
@@ -158,10 +162,14 @@ jobs:
158162
go,
159163
java,
160164
javascript,
165+
php,
161166
python2,
162167
python3,
163-
php,
168+
swift,
164169
]
170+
exclude:
171+
- os: windows-latest
172+
target: swift
165173

166174
steps:
167175
- name: Install dependencies (Ubuntu)
@@ -235,10 +243,17 @@ jobs:
235243
extensions: mbstring
236244
tools: composer
237245

246+
- name: Setup Swift
247+
if: matrix.target == 'swift'
248+
uses: swift-actions/setup-swift@v1
249+
with:
250+
swift-version: '5.2'
251+
238252
- name: Check out code
239253
uses: actions/checkout@v2
240254

241255
- name: Checkout antlr PHP runtime
256+
if: matrix.target == 'php'
242257
uses: actions/checkout@v2
243258
with:
244259
repository: antlr/antlr-php-runtime
@@ -247,7 +262,13 @@ jobs:
247262
- name: Build tool with Maven
248263
run: mvn install -DskipTests=true -Darguments="-Dmaven.javadoc.skip=true" -B -V
249264

250-
- name: Test with Maven (Windows)
265+
- name: Test tool
266+
if: matrix.target == 'java'
267+
run: |
268+
cd tool-testsuite
269+
mvn test
270+
271+
- name: Test runtime (Windows)
251272
if: startsWith(matrix.os, 'windows')
252273
run: |
253274
gci env:* | sort-object name
@@ -263,7 +284,7 @@ jobs:
263284
env:
264285
CMAKE_GENERATOR: Ninja
265286

266-
- name: Test with Maven (non-Windows)
287+
- name: Test runtime (non-Windows)
267288
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
268289
run: |
269290
env
@@ -272,6 +293,7 @@ jobs:
272293
case ${{ matrix.target }} in
273294
python2) mvn -X '-Dantlr-python2-exec=${{ env.pythonLocation }}/bin/python' '-Dtest=python2.**' test ;;
274295
python3) mvn -X '-Dantlr-python3-exec=${{ env.pythonLocation }}/bin/python' '-Dtest=python3.**' test ;;
296+
swift) mvn -X -e '-Dtest=python3.**' test ;;
275297
*) mvn -X '-Dtest=${{ matrix.target }}.**' test ;;
276298
esac
277299

0 commit comments

Comments
 (0)