Skip to content

Commit

Permalink
Compile and upload package using package.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Nov 23, 2024
1 parent 43bfc39 commit c03abb9
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,26 @@ jobs:
python3-wxpython
sqlite3-devel
zstd-devel
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H-%M-%S" UTC)
file(APPEND "$ENV{GITHUB_OUTPUT}" "timestamp=${current_date}")
- name: ccache cache files
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: .ccache
key: ${{ matrix.os }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ matrix.os }}-ccache-
save-always: true
- name: Configure ccache
run: |
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> "${GITHUB_ENV}"
echo "CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache" >> "${GITHUB_ENV}"
echo "CCACHE_MAXSIZE=400M" >> "${GITHUB_ENV}"
shell: msys2 {0}
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
Expand All @@ -82,15 +101,34 @@ jobs:
- name: Compile GRASS GIS
shell: msys2 {0}
run: |
.github/workflows/build_osgeo4w.sh
ccache --show-stats
MSYSPATH=$(cygpath -a msys64/usr/bin):$OSGEO4W_ROOT_MSYS/bin:$(cygpath --sysdir)
MSYSPATH=${MSYSPATH//\/cygdrive/}
ccache --show-config
ccache --zero-stats
PATH=$MSYSPATH:$PATH mswindows/osgeo4w/package.sh
ccache --show-stats --verbose --verbose
env:
PACKAGE_POSTFIX: "-dev"
OSGEO4W_ROOT: "C:\\OSGeo4W"
OSGEO4W_ROOT_MSYS: "/c/OSGeo4W"
PACKAGE_PATCH: ${{ github.sha }}-1
- name: Upload OSGeo4W grass package artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: grass-osgeo4w-package-${{ matrix.os }}
path: mswindows/osgeo4w/package
include-hidden-files: true
retention-days: 3

- name: Print installed versions
if: always()
shell: msys2 {0}
run: .github/workflows/print_versions.sh

- name: Test executing of the grass command
run: .github/workflows/test_simple.bat 'C:\OSGeo4W\opt\grass\grass85.bat'
run: .github/workflows/test_simple.bat 'C:\OSGeo4W\bin\grass85.bat'

- name: Test executing of the grass command in bash
shell: msys2 {0}
Expand All @@ -101,7 +139,7 @@ jobs:
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}""
- name: Run pytest with a single worker
run: |
call %OSGEO4W_ROOT%\opt\grass\etc\env.bat
call %OSGEO4W_ROOT%\apps\grass\grass85\etc\env.bat
set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH%
path %GISBASE%\lib;%GISBASE%\bin;%PATH%
pytest --verbose --color=yes ^
Expand All @@ -110,7 +148,7 @@ jobs:
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}""

- name: Run tests
run: .github/workflows/test_thorough.bat 'C:\OSGeo4W\opt\grass\grass85.bat' 'C:\OSGeo4W\bin\python3'
run: .github/workflows/test_thorough.bat 'C:\OSGeo4W\bin\grass85.bat' 'C:\OSGeo4W\bin\python3'

- name: Make HTML test report available
if: ${{ always() }}
Expand Down

0 comments on commit c03abb9

Please sign in to comment.