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

Fixing up some URLs and variables used for versioning #305

Merged
merged 2 commits into from
Dec 2, 2021
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
11 changes: 8 additions & 3 deletions ClangSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClangSharp.PInvokeGenerator
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{2F805BB5-6089-44E3-8DD0-72104DBB29F0}"
ProjectSection(SolutionItems) = preProject
scripts\azure-pipelines.yml = scripts\azure-pipelines.yml
scripts\azure-unix.yml = scripts\azure-unix.yml
scripts\azure-windows.yml = scripts\azure-windows.yml
scripts\build.ps1 = scripts\build.ps1
scripts\build.sh = scripts\build.sh
scripts\cibuild.cmd = scripts\cibuild.cmd
Expand Down Expand Up @@ -230,6 +227,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libClangSharp.runtime.freeb
packages\libClangSharp\libClangSharp.runtime.freebsd.13-x64\libClangSharp.runtime.freebsd.13-x64.nuspec = packages\libClangSharp\libClangSharp.runtime.freebsd.13-x64\libClangSharp.runtime.freebsd.13-x64.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{FF42B475-5025-45BA-B278-60F29B53C023}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{034EBD16-E96F-4530-B37D-30B16C4E9876}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -302,6 +306,7 @@ Global
{E76E41C3-FD6E-47FB-BC1E-120C8F88C07C} = {DFACF682-2673-4AE1-8F10-816D025C2D45}
{19337D54-F5B0-4131-A753-B788EF5FE677} = {EDEC2130-DA14-4415-91A3-225733FB61F8}
{B3A22C21-0699-4963-B665-F9AA74F0AF08} = {EDEC2130-DA14-4415-91A3-225733FB61F8}
{034EBD16-E96F-4530-B37D-30B16C4E9876} = {FF42B475-5025-45BA-B278-60F29B53C023}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A9D18E0B-5409-457D-B5F3-0E217136BB01}
Expand Down
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup>
<BaseArtifactsPath>$(MSBuildThisFileDirectory)artifacts/</BaseArtifactsPath>
<BaseArtifactsPathSuffix>$(ClangSharpProjectCategory)/$(MSBuildProjectName)</BaseArtifactsPathSuffix>
<RepositoryUrl>https://github.com/microsoft/ClangSharp/</RepositoryUrl>
<RepositoryUrl>https://github.com/dotnet/ClangSharp/</RepositoryUrl>
</PropertyGroup>

<!-- Default settings that explicitly differ from the Sdk.props defaults -->
Expand All @@ -39,12 +39,12 @@
<Authors>.NET Foundation and Contributors</Authors>
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
<Company>.NET Foundation</Company>
<ContinuousIntegrationBuild Condition="'$(BUILD_BUILDNUMBER)' != ''">true</ContinuousIntegrationBuild>
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
<Product>ClangSharp</Product>
<VersionPrefix>13.0.0</VersionPrefix>
<VersionSuffix>beta1</VersionSuffix>
<VersionSuffix Condition="'$(BUILD_REASON)' == 'PullRequest'">pr</VersionSuffix>
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">beta1</VersionSuffix>
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
</PropertyGroup>

<!-- Default settings that are otherwise undefined -->
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</PropertyGroup>

<!-- Settings that are only set for CI builds -->
<PropertyGroup Condition="'$(BUILD_BUILDNUMBER)' != ''">
<PackageVersion Condition="'$(EXCLUDE_BUILDNUMBER_FROM_PACKAGE)' == ''">$(Version)-$(BUILD_BUILDNUMBER)</PackageVersion>
<PropertyGroup Condition="'$(GITHUB_RUN_ID)' != ''">
<PackageVersion Condition="'$(EXCLUDE_RUN_ID_FROM_PACKAGE)' != 'true'">$(Version).$(GITHUB_RUN_ID)</PackageVersion>
</PropertyGroup>

<!-- Settings that allow testing and packing to work by default -->
Expand Down
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

ClangSharp provides Clang bindings written in C#. It is self-hosted and auto-generates itself by parsing the Clang C header files using ClangSharpPInvokeGenerator.

| Job | Debug Status | Release Status |
| --- | ------------ | -------------- |
| Windows x86 | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=windows_debug_x86)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=windows_release_x86)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) |
| Windows x64 | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=windows_debug_x64)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=windows_release_x64)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) |
| Ubuntu 18.04 x64 | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=ubuntu_debug_x64)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=ubuntu_release_x64)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) |
| MacOS x64 | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=macos_debug_x64)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) | [![Build Status](https://dev.azure.com/ms/ClangSharp/_apis/build/status/microsoft.ClangSharp?branchName=main&jobName=macos_release_x64)](https://dev.azure.com/ms/ClangSharp/_build/latest?definitionId=155&branchName=main) |
![ci](https://github.com/dotnet/clangsharp/workflows/ci/badge.svg?branch=main&event=push)

A nuget package for the project is provided here: https://www.nuget.org/packages/clangsharp.
A .NET tool for the P/Invoke generator project is provided here: https://www.nuget.org/packages/ClangSharpPInvokeGenerator
Expand Down Expand Up @@ -53,7 +48,7 @@ See [LICENSE.md](LICENSE.md) in the repository root for more information.

### Building Managed

ClangSharp requires the [.NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0) and can be built simply with `dotnet build -c Release`.
ClangSharp requires the [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) and can be built simply with `dotnet build -c Release`.

You can reproduce what the CI environment does by running `./scripts/cibuild.cmd` on Windows or `./scripts.cibuild.sh` on Unix.
This will download the required .NET SDK locally and use that to build the repo; it will also run through all available actions in the appropriate order.
Expand Down Expand Up @@ -81,7 +76,7 @@ cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_INSTALL_PREFIX=../install -G "Visual
You can then open `LLVM.sln` in Visual Studio, change the configuration to `Release` and build the `install` project.
Afterwards, you can then build `libClangSharp` where the process followed is roughly:
```cmd
git clone https://github.com/microsoft/clangsharp
git clone https://github.com/dotnet/clangsharp
cd clangsharp
mkdir artifacts/bin/native
cd artifacts/bin/native
Expand All @@ -92,7 +87,7 @@ You can then open `libClangSharp.sln` in Visual Studio, change the configuration

If you building on Linux
```
git clone https://github.com/microsoft/clangsharp
git clone https://github.com/dotnet/clangsharp
cd clangsharp
mkdir artifacts/bin/native
cd artifacts/bin/native
Expand All @@ -102,7 +97,7 @@ make

or if you prefer Ninja
```
git clone https://github.com/microsoft/clangsharp
git clone https://github.com/dotnet/clangsharp
cd clangsharp
mkdir artifacts/bin/native
cd artifacts/bin/native
Expand All @@ -120,7 +115,7 @@ dotnet tool install --global ClangSharpPInvokeGenerator --version 13.0.0-beta1
ClangSharpPInvokeGenerator @generate.rsp
```

A response file allows you to specify and checkin the command line arguments in a text file, with one argument per line. For example: https://github.com/microsoft/ClangSharp/blob/main/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp
A response file allows you to specify and checkin the command line arguments in a text file, with one argument per line. For example: https://github.com/dotnet/ClangSharp/blob/main/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp
At a minimum, the command line expects one or more input files (`-f`), an output namespace (`-n`), and an output location (`-o`). A typical response file may also specify explicit files to traverse, configuration options, name remappings, and other fixups.

The full set of available switches:
Expand Down Expand Up @@ -227,9 +222,9 @@ artifacts/bin/sources/ClangSharpPInvokeGenerator/Debug/net5.0/ClangSharpPInvokeG

The P/Invoke Generator is currently used by several projects:

* [microsoft/clangsharp](https://github.com/microsoft/clangsharp) - ClangSharp is self-hosting
* [microsoft/llvmsharp](https://github.com/microsoft/llvmsharp) - Bindings over libLLVM
* [microsoft/win32metadata](https://github.com/microsoft/win32metadata) - Bindings over the Windows SDK meant for downstream use by projects such as CsWin32, RsWin32, etc
* [dotnet/clangsharp](https://github.com/dotnet/clangsharp) - ClangSharp is self-hosting
* [dotnet/llvmsharp](https://github.com/dotnet/llvmsharp) - Bindings over libLLVM
* [microsoft/win32metadata](https://github.com/dotnet/win32metadata) - Bindings over the Windows SDK meant for downstream use by projects such as CsWin32, RsWin32, etc
* [terrafx/terrafx.interop.windows](https://github.com/terrafx/terrafx.interop.windows) - Bindings for D3D10, D3D11, D3D12, D2D1, DWrite, WIC, User32, and more in a single NuGet
* [terrafx/terrafx.interop.vulkan](https://github.com/terrafx/terrafx.interop.vulkan) - Bindings for Vulkan
* [terrafx/terrafx.interop.xlib](https://github.com/terrafx/terrafx.interop.xlib) - Bindings for Xlib
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>freebsd 12 x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>freebsd 12 x86 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>freebsd 13 x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>freebsd 13 x86 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>linux arm native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>linux arm64 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>osx x64 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>ubuntu 18.04 x64 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>ubuntu 20.04 x64 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>ubuntu 21.04 x64 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>win arm64 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>win x64 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>win x86 native library for libClangSharp.</description>
<copyright>Copyright © .NET Foundation and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="main" />
<repository type="git" url="https://github.com/dotnet/clangsharp" branch="main" />
</metadata>
<files>
<file src="..\..\..\LICENSE.md" target="LICENSE.TXT" />
Expand Down
Loading