Skip to content

Commit

Permalink
Fix env
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Apr 19, 2024
1 parent 79277b1 commit f111ee1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,8 @@ jobs:
shell: pwsh
run: bin/fetch-cobolcheck.ps1

- name: Setup environment
shell: pwsh
run: |
Get-Command "cobc" -ErrorAction SilentlyContinue
ls ${env:GITHUB_WORKSPACE}
ls ${env:GITHUB_WORKSPACE}\bin
ls ${env:GITHUB_WORKSPACE}\gnucobol
ls ${env:GITHUB_WORKSPACE}\gnucobol\bin
$env:Path = "${env:GITHUB_WORKSPACE}\gnucobol\bin;${env:GITHUB_WORKSPACE}\bin;${env:Path}"
printenv
[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
run: |
bin/setup-environment.ps1
bin/test.ps1
14 changes: 14 additions & 0 deletions bin/setup-environment.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Get-Command "cobc" -ErrorAction SilentlyContinue
Get-Command "cobc.exe" -ErrorAction SilentlyContinue
ls ${env:GITHUB_WORKSPACE}
ls ${env:GITHUB_WORKSPACE}\bin
ls ${env:GITHUB_WORKSPACE}\gnucobol
ls ${env:GITHUB_WORKSPACE}\gnucobol\bin
$env:Path = "${env:GITHUB_WORKSPACE}\gnucobol\bin;${env:GITHUB_WORKSPACE}\bin;${env:Path}"
printenv
[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 f111ee1

Please sign in to comment.