Skip to content

Four new exercises #255

Four new exercises

Four new exercises #255

Workflow file for this run

# 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@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Cache GnuCOBOL
id: cache-gnu-cobol
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
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