-
-
Notifications
You must be signed in to change notification settings - Fork 22
65 lines (56 loc) · 2.57 KB
/
test-windows.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
# This workflow will do a clean install of the dependencies and run tests across different versions
#
# Replace <track> with the track name
# Replace <image-name> with an image to run the jobs on
# Replace <action to setup tooling> with a github action to setup tooling on the image
# Replace <install dependencies> with a cli command to install the dependencies
#
# Find Github Actions to setup tooling here:
# - https://github.com/actions/?q=setup&type=&language=
# - https://github.com/actions/starter-workflows/tree/main/ci
# - https://github.com/marketplace?type=actions&query=setup
#
# Requires scripts:
# - bin/test
name: COBOL / Test (Windows)
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
ci:
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cache GnuCOBOL
id: cache-gnu-cobol
uses: actions/cache@v3
with:
path: ~\gnucobol-3.2-dev.zip
key: ${{ runner.os }}-gnu-cobol-3.2
- name: Download GnuCOBOL
if: steps.cache-gnu-cobol.outputs.cache-hit != 'true'
shell: pwsh
run: |
$requestOpts = @{
Headers = If ($env:GITHUB_TOKEN) { @{ Authorization = "Bearer ${env:GITHUB_TOKEN}" } } Else { @{ } }
MaximumRetryCount = 3
RetryIntervalSec = 1
}
Invoke-WebRequest -Uri 'https://ci.appveyor.com/api/projects/GitMensch/gnucobol-3-x-win32-posix/artifacts/gnucobol-3.2-dev-MinGW-binaries%20(debug).zip?job=Environment:%20BUILD_TYPE=MSYS,%20BUILD_BIN=C:\MinGW\msys\1.0\bin' -OutFile ~\gnucobol-3.2-dev.zip @requestOpts
- name: Extract GnuCOBOL
shell: pwsh
run: Expand-Archive ~\gnucobol-3.2-dev.zip -DestinationPath gnucobol -Force
- name: Run tests for all exercises
shell: pwsh
run: |
$env:Path = "D:\a\cobol\cobol\gnucobol\bin;" + $env:Path
[System.Environment]::SetEnvironmentVariable('COB_CONFIG_DIR', 'D:\a\cobol\cobol\gnucobol\config')
[System.Environment]::SetEnvironmentVariable('COB_COPY_DIR', 'D:\a\cobol\cobol\gnucobol\copy')
[System.Environment]::SetEnvironmentVariable('COB_CFLAGS', '-I D:\a\cobol\cobol\gnucobol\include')
[System.Environment]::SetEnvironmentVariable('COB_LDFLAGS', '-L D:\a\cobol\cobol\gnucobol\lib')
[System.Environment]::SetEnvironmentVariable('COB_LIBRARY_PATH', 'D:\a\cobol\cobol\gnucobol\lib')
[System.Environment]::SetEnvironmentVariable('COB_LIBS', 'D:\a\cobol\cobol\gnucobol\bin\libcob-4.dll')
bin/test.ps1