Fix #131: Large write returns without error, but not all data is written #421
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
- v1 | |
tags: | |
- '*' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Fetch tags | |
run: git fetch --tags --force | |
- name: Metadata | |
run: echo "IS_RELEASE=${{ startsWith(github.ref, 'refs/tags/') }}" >> $GITHUB_ENV | |
- name: Environment | |
run: | | |
echo "VERSION=$(python build/print_version.py ${{ github.run_number }} ${{ env.IS_RELEASE }} false)" >> $GITHUB_ENV | |
echo "$(python build/print_solution.py)" >> $GITHUB_ENV | |
- name: Extract annotation tag | |
if: ${{ env.IS_RELEASE == 'true' }} | |
run: python build/create_tag_body.py | |
- name: Cache HDF5 installer | |
id: cache-primes | |
uses: actions/cache@v3 | |
with: | |
path: hdf5-1.14.4-2-ubuntu-2204_gcc.tar.gz | |
key: hdf5-installer | |
- name: Download HDF5 installer | |
if: steps.cache-primes.outputs.cache-hit != 'true' | |
run: wget -q https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.4.2/hdf5-1.14.4-2-ubuntu-2204_gcc.tar.gz | |
- name: Install | |
run: | | |
tar -xzf hdf5-1.14.4-2-ubuntu-2204_gcc.tar.gz | |
tar -xzf hdf5/HDF5-1.14.4.2-Linux.tar.gz | |
sudo ln -s $(pwd)/HDF5-1.14.4.2-Linux/HDF_Group/HDF5/1.14.4.2/bin/h5dump /usr/bin/h5dump | |
h5dump --version | |
- name: Build | |
run: | | |
dotnet build -c Release src/PureHDF/PureHDF.csproj | |
dotnet build -c Release src/PureHDF.Filters.Blosc2/PureHDF.Filters.Blosc2.csproj | |
dotnet build -c Release src/PureHDF.Filters.BZip2.SharpZipLib/PureHDF.Filters.BZip2.SharpZipLib.csproj | |
dotnet build -c Release src/PureHDF.Filters.Deflate.ISA-L/PureHDF.Filters.Deflate.ISA-L.csproj | |
dotnet build -c Release src/PureHDF.Filters.Deflate.SharpZipLib/PureHDF.Filters.Deflate.SharpZipLib.csproj | |
dotnet build -c Release src/PureHDF.Filters.Lzf/PureHDF.Filters.Lzf.csproj | |
dotnet build -c Release src/PureHDF.SourceGenerator/PureHDF.SourceGenerator.csproj | |
dotnet build -c Release src/PureHDF.VFD.AmazonS3/PureHDF.VFD.AmazonS3.csproj | |
dotnet build -c Release src/PureHDF.VOL.Hsds/PureHDF.VOL.Hsds.csproj | |
# - run writing tests separately because h5dump seems to interfere with the | |
# reading tests ("The process cannot access the file '/tmp/tmpXXXXX.tmp' because it is being used by another process") | |
# - interestingly new "CanFilterXXX" tests also interfere with the reading tests (h5dump is used here, too) | |
# -> this needs to be investigated | |
- name: Test (common) | |
run: dotnet test -c Release /p:BuildProjectReferences=false --filter "FullyQualifiedName!~PureHDF.Tests.Writing & FullyQualifiedName!~PureHDF.Tests.Filters & FullyQualifiedName!~PureHDF.Tests.Reading.VOL.HsdsTests" | |
- name: Test (writing) | |
run: dotnet test -c Release /p:BuildProjectReferences=false --filter "FullyQualifiedName~PureHDF.Tests.Writing" | |
- name: Test (filters) | |
run: dotnet test -c Release /p:BuildProjectReferences=false --filter "FullyQualifiedName~PureHDF.Tests.Filters" | |
- name: Test (HSDS) | |
run: bash tests/PureHDF.Tests/Reading/PureHDF.VOL/run-hsds-tests.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
artifacts/package/release/ | |
artifacts/tag_body.txt | |
- name: Prepare GitHub Pages | |
run: | | |
dotnet tool install -g docfx --version 2.70.1 | |
docfx doc/docfx.json | |
touch doc/_site/.nojekyll | |
if: github.ref == 'refs/heads/master' | |
- name: Deploy GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: doc/_site | |
if: github.ref == 'refs/heads/master' | |
outputs: | |
is_release: ${{ env.IS_RELEASE }} | |
version: ${{ env.VERSION }} | |
publish_dev: | |
needs: build | |
name: Publish (dev) | |
runs-on: ubuntu-latest | |
if: ${{ needs.build.outputs.is_release != 'true' }} | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifacts | |
path: artifacts | |
- name: Nuget package (MyGet) | |
run: dotnet nuget push 'artifacts/package/release/*.nupkg' --api-key ${MYGET_API_KEY} --source https://www.myget.org/F/apollo3zehn-dev/api/v3/index.json | |
env: | |
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }} | |
publish_release: | |
needs: build | |
name: Publish (release) | |
runs-on: ubuntu-latest | |
if: ${{ needs.build.outputs.is_release == 'true' }} | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifacts | |
path: artifacts | |
- name: GitHub Release Artifacts | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: artifacts/tag_body.txt | |
- name: Nuget package (Nuget) | |
run: dotnet nuget push 'artifacts/package/release/*.nupkg' --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} |