This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new c43e6f36 build(csharp): PowerShell build scripts for C#  (#1350)
c43e6f36 is described below

commit c43e6f36dee99c66c3b98647005adf86492561e0
Author: davidhcoe <[email protected]>
AuthorDate: Tue Dec 19 08:55:45 2023 -0500

    build(csharp): PowerShell build scripts for C#  (#1350)
    
    Adding the build scripts that were split out from
    https://github.com/apache/arrow-adbc/pull/1345
    
    ---------
    
    Co-authored-by: David Coe <[email protected]>
---
 .github/dependabot.yml          | 41 ++++++++++++++++++++++++++++++++++
 ci/scripts/csharp_build.ps1     | 19 ++++++++++++++++
 ci/scripts/csharp_pack.ps1      | 32 +++++++++++++++++++++++++++
 ci/scripts/csharp_smoketest.ps1 | 49 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 141 insertions(+)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..83c5135e
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
+    commit-message:
+      prefix: "chore: "
+  - package-ecosystem: "nuget"
+    directory: "/csharp/"
+    schedule:
+      interval: "weekly"
+    commit-message:
+      prefix: "chore(csharp): "
+    ignore:
+      - dependency-name: "Microsoft.Extensions.*"
+        update-types:
+          - "version-update:semver-major"
+      - dependency-name: "Microsoft.Bcl.*"
+        update-types:
+          - "version-update:semver-major"
+      - dependency-name: "System.*"
+        update-types:
+          - "version-update:semver-major"
diff --git a/ci/scripts/csharp_build.ps1 b/ci/scripts/csharp_build.ps1
new file mode 100644
index 00000000..01b75bf8
--- /dev/null
+++ b/ci/scripts/csharp_build.ps1
@@ -0,0 +1,19 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+cd ..\..\csharp
+
+dotnet build
diff --git a/ci/scripts/csharp_pack.ps1 b/ci/scripts/csharp_pack.ps1
new file mode 100644
index 00000000..b875b60d
--- /dev/null
+++ b/ci/scripts/csharp_pack.ps1
@@ -0,0 +1,32 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+param (
+    [string]$destination=$null
+)
+
+$loc = Get-Location
+
+if ($loc.ToString().ToLower().EndsWith("csharp") -eq $False) {
+    cd ..\..\csharp
+}
+
+if ($destination) {
+    dotnet pack -c Release -o $destination
+}
+else {
+    dotnet pack -c Release
+}
diff --git a/ci/scripts/csharp_smoketest.ps1 b/ci/scripts/csharp_smoketest.ps1
new file mode 100644
index 00000000..da5edd77
--- /dev/null
+++ b/ci/scripts/csharp_smoketest.ps1
@@ -0,0 +1,49 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+param (
+    [string]$destination=".\packages"
+)
+
+$ErrorActionPreference = "Stop"
+
+Write-Host "This script performs the following steps:"
+Write-Host "  - Runs unit tests against all projects"
+Write-Host "  - Packages everything to NuGet packages in $destination"
+Write-Host "  - Runs smoke tests using the NuGet packages"
+
+Write-Host ""
+
+cd $PSScriptRoot
+cd ..\..\csharp
+
+Write-Host "Running dotnet test"
+
+dotnet test
+
+Write-Host "Running dotnet pack"
+
+$loc = Get-Location
+
+Write-Host $loc
+
+Invoke-Expression "powershell -executionpolicy bypass -File 
$PSScriptRoot\csharp_pack.ps1 -destination $destination"
+
+Write-Host "Running smoke tests"
+
+cd test\SmokeTests
+
+dotnet test

Reply via email to