Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add C# to packaging.yml #1636

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading