Skip to content

Commit

Permalink
Try include cobolcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Apr 19, 2024
1 parent 0e4f8b5 commit cc8a230
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
id: cache-gnu-cobol
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/gnucobol-3.2.7z
key: gnucobol-3.2.7z
path: ~/gnucobol
key: gnucobol-3.2.7

- name: Download GnuCOBOL
if: steps.cache-gnu-cobol.outputs.cache-hit != 'true'
Expand All @@ -48,13 +48,12 @@ jobs:
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
if: steps.cache-gnu-cobol.outputs.cache-hit != 'true'
shell: pwsh
run: |
ls $HOME
7z x $HOME\gnucobol-3.2.7z -ognucobol -y
ls $HOME
run: 7z x $HOME\gnucobol-3.2.7z -ognucobol -y

- name: Fetch CobolCheck
if: steps.cache-gnu-cobol.outputs.cache-hit != 'true'
shell: pwsh
run: bin/fetch-cobolcheck.ps1

Expand Down
2 changes: 1 addition & 1 deletion bin/fetch-cobolcheck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Function Get-DownloadUrl {
}

$downloadUrl = Get-DownloadUrl
$outputFile = Join-Path -Path $PSScriptRoot -ChildPath "cobolcheck.exe"
$outputFile = Join-Path -Path $HOME -ChildPath "gnucobol" | -ChildPath "bin" | -ChildPath "cobolcheck.exe"
Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile @requestOpts
15 changes: 8 additions & 7 deletions bin/setup-environment.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
$env:Path = "${env:GITHUB_WORKSPACE}\gnucobol\bin;${env:GITHUB_WORKSPACE}\bin;${env:Path}"
[System.Environment]::SetEnvironmentVariable('COB_CONFIG_DIR', "${env:GITHUB_WORKSPACE}\gnucobol\config")
[System.Environment]::SetEnvironmentVariable('COB_COPY_DIR', "${env:GITHUB_WORKSPACE}\gnucobol\copy")
[System.Environment]::SetEnvironmentVariable('COB_CFLAGS', "-I ${env:GITHUB_WORKSPACE}\gnucobol\include")
[System.Environment]::SetEnvironmentVariable('COB_LDFLAGS', "-L ${env:GITHUB_WORKSPACE}\gnucobol\lib")
[System.Environment]::SetEnvironmentVariable('COB_LIBRARY_PATH', "${env:GITHUB_WORKSPACE}\gnucobol\lib")
[System.Environment]::SetEnvironmentVariable('COB_LIBS', "${env:GITHUB_WORKSPACE}\gnucobol\bin\libcob-4.dll")
$gnucobolDir = "${env:GITHUB_WORKSPACE}\gnucobol"
$env:Path = "$gnucobolDir\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")

0 comments on commit cc8a230

Please sign in to comment.