Skip to content

from appveyor to sourceforge #301

from appveyor to sourceforge

from appveyor to sourceforge #301

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: $HOME\gnucobol-3.2.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://www.arnoldtrembley.com/GC32-BDB-SP1-rename-7z-to-exe.7z' -OutFile $HOME\gnucobol-3.2.7z @requestOpts
- name: Extract GnuCOBOL
shell: pwsh
run: 7z x $HOME\gnucobol-3.2.7z -ognucobol -y
- name: Fetch CobolCheck
shell: pwsh
run: bin/fetch-cobolcheck.ps1
- name: Setup environment
shell: pwsh
run: |
ls ${env:GITHUB_WORKSPACE}
$gnucobolDir = Join-Path $env:GITHUB_WORKSPACE -ChildPath "cobol" | Join-Path -ChildPath "gnucobol"
$env:Path = "${gnucobolDir}\bin;${env:GITHUB_WORKSPACE}\bin;${env:Path}"
[System.Environment]::SetEnvironmentVariable('COB_CONFIG_DIR', "${gnucobolDir}\config")
[System.Environment]::SetEnvironmentVariable('COB_COPY_DIR', "${gnucobolDir}\copy")
[System.Environment]::SetEnvironmentVariable('COB_CFLAGS', "-I ${gnucobolDir}\include")
[System.Environment]::SetEnvironmentVariable('COB_LDFLAGS', "-L ${gnucobolDir}\lib")
[System.Environment]::SetEnvironmentVariable('COB_LIBRARY_PATH', "${gnucobolDir}\lib")
[System.Environment]::SetEnvironmentVariable('COB_LIBS', "${gnucobolDir}\bin\libcob-4.dll")
- name: Run tests for all exercises
shell: pwsh
run: bin/test.ps1