add .net 9 target #428
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' | |
env: | |
VERSION: 5.0.3 | |
PACKAGE_SUFFIX: '-pre.2' | |
# PACKAGE_SUFFIX: '' | |
ASM_VERSION: 5.0.0 | |
DOC_INSTANCE: wrs/pq | |
DOC_ARTIFACT: webHelpPQ2-all.zip | |
DOC_ALGOLIA_ARTIFACT: algolia-indexes-PQ.zip | |
DOC_DOCKER_VERSION: 241.15989 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
test: | |
name: 🧪 Unit Tests - ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
name: Linux x64 | |
- os: windows-latest | |
name: Windows x64 | |
- os: windows-latest | |
name: Windows x86 | |
runtime: win-x86 | |
- os: macos-latest | |
name: MacOS ARM64 | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.0.x | |
8.0.x | |
9.0.x | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Python dependencies | |
run: pip install pyarrow pandas | |
# only run this step if matrix.runtime is empty | |
- name: 'test on ${{ matrix.runtime }}' | |
if: matrix.arch == '' | |
run: dotnet test src/Parquet.sln -c release | |
# only run this step if matrix.arch is not empty | |
- name: 'test on ${{ matrix.runtime }}' | |
if: matrix.arch != '' | |
run: dotnet test src/Parquet.sln -c release -r ${{ matrix.runtime }} | |
build: | |
runs-on: 'ubuntu-latest' | |
name: '🏛️ Build NuGet' | |
steps: | |
- run: | | |
echo head_ref: ${{ github.head_ref }} | |
echo run id: ${{ github.run_id }} | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.0.x | |
8.0.x | |
9.0.x | |
- name: Build Library | |
run: | | |
envsubst < src/Parquet/Globals.cs > g.tmp && mv g.tmp src/Parquet/Globals.cs | |
cat src/Parquet/Globals.cs | |
dotnet build src/Parquet.sln -c release /p:Version=${{ env.VERSION }}${{ env.PACKAGE_SUFFIX }} /p:FileVersion=$VERSION /p:AssemblyVersion=$ASM_VERSION | |
- name: collect artifacts | |
run: | | |
mkdir artifacts | |
cp src/Parquet/bin/Release/*.nupkg artifacts/ | |
cp src/Parquet.Data.Analysis/bin/Release/*.nupkg artifacts/ | |
cp docs/rn/${{ env.VERSION }}.md artifacts/release-notes.md | |
- uses: actions/upload-artifact@v4 | |
name: upload artifacts | |
with: | |
name: bin | |
path: artifacts/* | |
floor-build: | |
runs-on: ubuntu-latest | |
name: '👤 Build Floor' | |
strategy: | |
matrix: | |
rid: | |
- linux-x64 | |
- linux-musl-x64 | |
- linux-musl-arm64 | |
- win-x64 | |
- osx-x64 | |
- osx-arm64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
9.0.x | |
- name: Build | |
env: | |
LATEST_NET_ONLY: true | |
run: | | |
envsubst < src/Parquet/Globals.cs > g.tmp && mv g.tmp src/Parquet/Globals.cs | |
dotnet restore src/Parquet.Floor/Parquet.Floor.csproj | |
dotnet publish src/Parquet.Floor/Parquet.Floor.csproj -c release -r ${{ matrix.rid }} -o floor-pub/${{ matrix.rid }} /p:Version=${{ env.VERSION }}${{ env.PACKAGE_SUFFIX }} /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.ASM_VERSION }} | |
mkdir -p floor-dist | |
zip -r -9 -j floor-dist/floor-${{ matrix.rid }}-${{ env.VERSION }}.zip floor-pub/${{ matrix.rid }}/* -x *.pdb *.xml | |
- uses: actions/upload-artifact@v4 | |
name: upload binary | |
if: github.ref == 'refs/heads/master' | |
with: | |
name: floor-${{ matrix.rid }} | |
path: floor-dist/*.zip | |
if-no-files-found: error | |
compression-level: 9 | |
retention-days: 1 | |
wrs: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
name: '📃 Writerside docs' | |
permissions: | |
id-token: write | |
pages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build Writerside docs | |
uses: JetBrains/writerside-github-action@v4 | |
with: | |
instance: ${{ env.DOC_INSTANCE }} | |
artifact: ${{ env.DOC_INSTANCE }} | |
docker-version: ${{ env.DOC_DOCKER_VERSION }} | |
- name: 🤐 Unzip artifact | |
run: unzip -O UTF-8 artifacts/${{ env.DOC_ARTIFACT }} -d dir | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Upload artifact to GH Pages | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: dir | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
release: | |
name: '🕋 Release library' | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
- build | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: ⬇️ Download Library binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: bin | |
path: bin | |
- name: print release notes | |
run: cat bin/release-notes.md | |
- name: 📦 Publish to NuGet | |
run: dotnet nuget push bin/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | |
release-all: | |
name: '🕋 Make GitHub Release' | |
runs-on: ubuntu-latest | |
needs: | |
- release | |
- floor-build | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: ⬇️ Download Library binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: bin | |
path: bin | |
- name: ⬇️ Download Floor binaries | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: floor-* | |
path: floor | |
merge-multiple: true | |
- name: 🔍 view artifacts to be used | |
run: ls -R | |
working-directory: . | |
# https://github.com/softprops/action-gh-release | |
- name: 📢 Create release | |
uses: softprops/action-gh-release@v1 | |
if: ${{ !env.PACKAGE_SUFFIX }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
name: ${{ env.VERSION }} | |
files: | | |
bin/*.nupkg | |
floor/*.zip | |
body_path: bin/release-notes.md |