Skip to content

90 how do you open older bag files #127

90 how do you open older bag files

90 how do you open older bag files #127

Workflow file for this run

name: Test Matrix - Windows
on:
push:
paths-ignore:
- 'docs/**'
- readme.*
- README.*
- '*.md'
- '*.svg'
- '*.png'
- .github/workflows/testmatrix.yml
- .github/workflows/testreporting.yml
branches: [ "master" ]
pull_request:
paths-ignore:
- 'docs/**'
- readme.*
- README.*
- '*.md'
- '*.svg'
- '*.png'
- .github/workflows/testmatrix.yml
- .github/workflows/testreporting.yml
branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
windows_build:
runs-on: ${{matrix.os}}
defaults:
run:
shell: bash
strategy:
fail-fast: true
matrix:
os: [windows-latest]
python-version: ["3.12"]
c_compiler: [cl]
include:
- VS_VERSION: Visual Studio 17
VS_VER: 2022
SDK: release-1911
MSVC_VER: 1920
ZLIB_URL: "https://github.com/madler/zlib/releases/download/v1.3/zlib13.zip"
LIBXML2_URL: "https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.12.0/libxml2-v2.12.0.zip"
HDF5_URL: "https://github.com/HDFGroup/hdf5/releases/download/hdf5-1_12_3/hdf5-1_12_3.zip"
CATCH2_URL: "https://github.com/catchorg/Catch2/archive/refs/tags/v3.4.0.zip"
env:
ARCHITECTURE: "amd64"
VS_VERSION: ${{ matrix.VS_VERSION }}
VS_VER: ${{ matrix.VS_VER }}
SDK: ${{ matrix.SDK }}
MSVC_VER: ${{ matrix.MSVC_VER }}
platform: ${{ matrix.platform }}
ZLIB_URL: ${{ matrix.ZLIB_URL }}
LIBXML2_URL: ${{ matrix.LIBXML2_URL }}
HDF5_URL: ${{ matrix.HDF5_URL }}
CATCH2_URL: ${{ matrix.CATCH2_URL }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set compiler environment
shell: cmd
run: |
if "%VS_VER%" == "2022" CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=%ARCHITECTURE%
echo PATH=%PATH%>> %GITHUB_ENV%
echo INCLUDE=%INCLUDE%>> %GITHUB_ENV%
echo LIB=%LIB%>> %GITHUB_ENV%
echo LIBPATH=%LIBPATH%>> %GITHUB_ENV%
- name: Build
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
Install-Module Pscx -AllowClobber
Install-Module VSSetup -Scope CurrentUser
# Setup
$env:BAG_INSTALL_PATH="$env:GITHUB_WORKSPACE\install"
$env:VENV_PATH="$env:GITHUB_WORKSPACE\venv"
# Debug: env
if(-Not (Test-Path -Path $env:BAG_INSTALL_PATH)) { mkdir $env:BAG_INSTALL_PATH }
# Create Python venv
python -m venv $env:VENV_PATH
# Debug: dir $env:GITHUB_WORKSPACE
# Download dependencies
if(-Not (Test-Path -Path downloads)) { mkdir downloads }
cd downloads
$env:ZLIB_ZIP="zlib.zip"
if(-Not (Test-Path -Path $env:ZLIB_ZIP -PathType Leaf)) { Invoke-WebRequest "$env:ZLIB_URL" -OutFile "$env:ZLIB_ZIP" }
$env:LIBXML2_ZIP="libxml2.zip"
if(-Not (Test-Path -Path $env:LIBXML2_ZIP -PathType Leaf)) { Invoke-WebRequest "$env:LIBXML2_URL" -OutFile "$env:LIBXML2_ZIP" }
$env:HDF5_ZIP="hdf5.zip"
if(-Not (Test-Path -Path $env:HDF5_ZIP -PathType Leaf)) { Invoke-WebRequest "$env:HDF5_URL" -OutFile "$env:HDF5_ZIP" }
$env:CATCH2_ZIP="catch2.zip"
if(-Not (Test-Path -Path $env:CATCH2_ZIP -PathType Leaf)) { Invoke-WebRequest "$env:CATCH2_URL" -OutFile "$env:CATCH2_ZIP" }
# Unzip and build dependencies
cd ..
mkdir src
cd src
# zlib
exec { 7z x ..\downloads\$env:ZLIB_ZIP }
cd zlib-1.3
if(-Not (Test-Path -Path build)) { mkdir build }
$env:CMAKE_INSTALL_PREFIX="-DCMAKE_INSTALL_PREFIX=" + $env:BAG_INSTALL_PATH
cmake -B build -G $env:VS_VERSION -S . $env:CMAKE_INSTALL_PREFIX -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target install -- /nologo /verbosity:minimal
cd ..
# libxml2
exec { 7z x ..\downloads\$env:LIBXML2_ZIP }
cd libxml2-v2.12.0
if(-Not (Test-Path -Path build)) { mkdir build }
cmake -B build -G $env:VS_VERSION -S . $env:CMAKE_INSTALL_PREFIX -DCMAKE_BUILD_TYPE=Release `
-DLIBXML2_WITH_ZLIB=ON -DLIBXML2_WITH_ICONV=OFF -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_PYTHON=OFF
cmake --build build --config Release --target install -- /nologo /verbosity:minimal
cd ..
# HDF5
exec { 7z x ..\downloads\$env:HDF5_ZIP }
cd hdfsrc
if(-Not (Test-Path -Path build)) { mkdir build }
cmake -B build -G $env:VS_VERSION -S . $env:CMAKE_INSTALL_PREFIX -DCMAKE_BUILD_TYPE=Release `
-DHDF5_BUILD_CPP_LIB=ON -DHDF5_BUILD_TOOLS:BOOL=OFF `
-DBUILD_TESTING:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON `
-DHDF5_BUILD_HL_LIB:BOOL=ON -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON
cmake --build build --config Release --target install -- /nologo /verbosity:minimal
cd ..
# Catch2
exec { 7z x ..\downloads\$env:CATCH2_ZIP }
cd Catch2-3.4.0
if(-Not (Test-Path -Path build)) { mkdir build }
# Debug: dir
# Debug: pwd
cmake -B build -G $env:VS_VERSION -S . $env:CMAKE_INSTALL_PREFIX -DCMAKE_BUILD_TYPE=Release `
-DBUILD_TESTING:BOOL=OFF
cmake --build build --config Release --target install -- /nologo /verbosity:minimal
cd ..\..
# Build and install BAG C++ API
cmake -G $env:VS_VERSION -DCMAKE_BUILD_TYPE=Release -B build -S . `
$env:CMAKE_INSTALL_PREFIX -DBUILD_SHARED_LIBS=ON `
-DBAG_BUILD_TESTS:BOOL=ON -DBAG_CI=ON -DCMAKE_OBJECT_PATH_MAX=1024
cmake --build build --config Release --target install
# Build and install bagPy Python wheel
$activate_cmd="$env:VENV_PATH\Scripts\Activate.ps1"
echo "Attempting to activate Python environment using script: $activate_cmd ..."
& $activate_cmd
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
$env:CMAKE_PREFIX_PATH=$env:BAG_INSTALL_PATH
python -m pip wheel -w .\wheel\ .\build\api\swig\python
$whl_path=Resolve-Path ".\wheel\bagPy-*.whl"
python -m pip install $whl_path
# Debug: Print contents of site-packages
Get-ChildItem -Recurse $env:VENV_PATH\Lib\site-packages
# Run C++ tests
$env:Path += ";$env:BAG_INSTALL_PATH\bin"
echo $env:Path
$env:BAG_SAMPLES_PATH="$env:GITHUB_WORKSPACE\examples\sample-data"
$test_path="$env:GITHUB_WORKSPACE\build\tests\Release\bag_tests.exe"
& $test_path
# Run Python tests (disable for now until we figure out why vanilla Python wheels don't seem to
# work on Windows, while Conda wheels on Windows do)
# Ignore GDAL compatibility test for now since we do this for Linux build and installing GDAL
# on Windows is a hassle.
python -m pytest --cov=bagPy --cov-branch --cov-report=xml --junitxml=python-test-results.xml `
.\python\test_compat_bag15.py .\python\test_compounddatatype.py .\python\test_dataset.py .\python\test_descriptor.py `
.\python\test_interleavedlegacylayer.py .\python\test_interleavedlegacylayerdescriptor.py `
.\python\test_metadata.py .\python\test_record.py .\python\test_simplelayer.py `
.\python\test_simplelayerdescriptor.py .\python\test_surfacecorrections.py `
.\python\test_surfacecorrectionsdescriptor.py .\python\test_trackinglist.py .\python\test_valuetable.py `
.\python\test_vrmetadata.py .\python\test_vrmetadatadescriptor.py .\python\test_vrnode.py `
.\python\test_vrnodedescriptor.py .\python\test_vrrefinements.py .\python\test_vrrefinementsdescriptor.py `
.\python\test_vrtrackinglist.py