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 pipeline support to bundle Go binaries in NuGet packages #1730

Merged
merged 77 commits into from
Apr 26, 2024

Conversation

davidhcoe
Copy link
Contributor

Adds support to the packages pipeline for building the Go binaries before the csharp pipeline. The output of these is that the Snowflake NuGet package is just an interop wrapper over the libraries, which should be included with the NuGet package.

Fixes #1720

</Content>

<!-- Mac/dylib -->
<Content Include="libadbc_driver_snowflake.dylib">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are Go-built binaries "fat" or would we need separate binaries for x64 and arm64?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would need separate binaries for x64 and arm64. You can control the build by using GOARCH=arm64 or GOARCH=amd64 if you want to cross compile

@lidavidm lidavidm changed the title fix(.github/workflows): Add pipeline support to bundle Go binaries in NuGet packages ci: Add pipeline support to bundle Go binaries in NuGet packages Apr 19, 2024
@CurtHagenlocher CurtHagenlocher changed the title ci: Add pipeline support to bundle Go binaries in NuGet packages ci: Add pipeline support to bundle Go binaries in NuGet packages Apr 22, 2024
Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a significant improvement over what we have currently so I wouldn't want to block it from being checked-in (other than the osx-x64 thing). I wouldn't mind another set of eyes on the YAML, but if I ignore the deleted and commented-out stuff what remains looks fine to me.

It would be nice to add support for osx-arm64 -- not just because I have an M1 Mac but also because I suspect they're starting to be the rule rather than the exception (at least in the developer community). But that could also be done as a separate change.

@davidhcoe davidhcoe marked this pull request as draft April 23, 2024 13:54
@davidhcoe davidhcoe marked this pull request as ready for review April 23, 2024 15:52
@davidhcoe davidhcoe marked this pull request as draft April 23, 2024 19:17
@davidhcoe
Copy link
Contributor Author

One problem seems to be that the conditional checks are needed in the .csproj to not fail the C# tests, but then they skip the packaging the files in the NuGet package. Still working on it.

lidavidm and others added 24 commits April 25, 2024 11:14
…pache#1725)

Hey!

As discussed in apache#1723, here is the first PR of the new complete Rust
implementation.

It includes:

- Traits and structs definitions for the public abstract API
- An implementation of a dummy driver for testing purposes (no test
currently because we need the driver manager and exporter to have
relevant tests)
- Constants from `adbc.h`

I put the code in `/rust2` but I can move it to `/rust` if you prefer.

CC @mbrobbel @paleolimbot @zeroshade @lidavidm
…1741)

Doesn't add anything meaningfully new, just adds tests for types.

Fixes apache#933.
Fixes apache#1743.

We use PostgreSQL instead of SQLite for testing. Because the SQLite
driver doesn't support GetStatistics yet.
Fixes apache#1747.

This is the binding of `AdbcConnectionGetStatisticNames()`.
…adbc (apache#1746)

Bumps [github.com/apache/arrow/go/v16](https://github.com/apache/arrow)
from 16.0.0-20240401151559-71321841eb6d to 16.0.0.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Li <[email protected]>
Update Rust workflow to only use Apache allowed actions. This also adds
`Cargo.lock` (used in cache key) to the Rust workspace following [this
recommendation](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html),
and fixes some doc warnings.
Hey!

Here is the second PR of the Rust implementation containing full FFI
bindings.

I've decided to manually implement bindings instead of relying on
[bindgen](https://rust-lang.github.io/rust-bindgen/) because:
- We don't want an additional dependency on clang (which bindgen depends
on) and so we cannot generate bindings at compile-time
- We could have checked-in the generated bindings in git but in that
case manually editing is unavoidable because generated bindings are
platform-dependent
- Besides, we still have to implement default methods, conversion traits
and release mechanisms.

In the end, I found it simpler to have everything manually implemented
rather than having some parts automatic and some others manual...
[arrow-rs](https://github.com/apache/arrow-rs) seems to have followed
the same path.
Fixes apache#1753.

It's a wrapper of `GADBCConnection` for Apache Arrow C GLib integration.
…hcoe/arrow-adbc into dev/1720-GoDriversInNuGetFix
@CurtHagenlocher
Copy link
Contributor

@lidavidm, as this is now passing ( and without any commented-out or deleted workflow tasks ;) ), I'd like to sign off on it -- but I'd feel a lot more comfortable if you could take a quick look too.

@lidavidm
Copy link
Member

Will do!

popd

- name: Upload Go binaries
uses: actions/upload-artifact@v3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed them to v4 but it was breaking and not uploading the files correctly, so I went back to v3.

@@ -146,10 +197,22 @@ jobs:
echo "schedule: ${{ github.event.schedule }}" >> $GITHUB_STEP_SUMMARY
echo "ref: ${{ github.ref }}" >> $GITHUB_STEP_SUMMARY

- uses: actions/download-artifact@v3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed them to v4 but it was breaking and not downloading the files correctly, so I went back to v3.

@CurtHagenlocher
Copy link
Contributor

Given what @davidhcoe says about switching to v4, I'm going to commit as-is.

@CurtHagenlocher CurtHagenlocher merged commit b38706d into apache:main Apr 26, 2024
30 checks passed
cocoa-xu pushed a commit to meowcraft-dev/arrow-adbc that referenced this pull request May 8, 2024
…che#1730)

Adds support to the packages pipeline for building the Go binaries
before the csharp pipeline. The output of these is that the Snowflake
NuGet package is just an interop wrapper over the libraries, which
should be included with the NuGet package.

Fixes apache#1720

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: David Coe <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Li <[email protected]>
Co-authored-by: Alexandre Crayssac <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Matthijs Brobbel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants