diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 4be32878e2..5126fb3073 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -120,6 +120,47 @@ jobs: path: | apache-arrow-adbc-${{ steps.version.outputs.VERSION }}.tar.gz + csharp: + name: "C#/.NET" + runs-on: ubuntu-latest + needs: + - source + steps: + - uses: actions/download-artifact@v3 + with: + name: source + + - name: Extract source archive + run: | + source_archive=$(echo apache-arrow-adbc-*.tar.gz) + VERSION=${source_archive#apache-arrow-adbc-} + VERSION=${VERSION%.tar.gz} + echo "VERSION=${VERSION}" >> $GITHUB_ENV + + tar xf apache-arrow-adbc-${VERSION}.tar.gz + mv apache-arrow-adbc-${VERSION} adbc + + - name: Show inputs + run: | + echo "upload_artifacts: ${{ inputs.upload_artifacts }}" >> $GITHUB_STEP_SUMMARY + echo "schedule: ${{ github.event.schedule }}" >> $GITHUB_STEP_SUMMARY + echo "ref: ${{ github.ref }}" >> $GITHUB_STEP_SUMMARY + + - name: Package + run: | + pushd adbc/ + docker compose run csharp-dist + popd + + - name: Archive nupkg + uses: actions/upload-artifact@v3 + with: + name: csharp + retention-days: 7 + path: | + adbc/csharp/artifacts/**/*.nupkg + adbc/csharp/artifacts/**/*.snupkg + docs: name: Documentation runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1cd405e5d..986f26a88d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -148,6 +148,15 @@ for details. [cmake-prefix-path]: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html [gtest]: https://github.com/google/googletest/ +### C#/.NET + +Make sure [.NET Core is installed](https://dotnet.microsoft.com/en-us/download). + +```shell +$ cd csharp +$ dotnet build +``` + ### Documentation The documentation uses the [Sphinx][sphinx] documentation generator. diff --git a/docker-compose.yml b/docker-compose.yml index d4113e8f2a..e31c8af0b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,15 @@ services: # These reuse Arrow's images for simplicity. You won't be able to # build the image from here. + ############################### C#/.NET ###################################### + + csharp-dist: + image: mcr.microsoft.com/dotnet/sdk:7.0 + volumes: + - .:/adbc:delegated + command: | + /adbc/ci/scripts/csharp_pack.sh /adbc + ############################ Documentation ################################### docs: