Skip to content

Commit

Permalink
ci: add C# to packaging.yml (apache#1636)
Browse files Browse the repository at this point in the history
Fixes apache#750.
  • Loading branch information
lidavidm committed Mar 18, 2024
1 parent a9ed4c3 commit aba748f
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
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

0 comments on commit aba748f

Please sign in to comment.