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

feat: Dotnet non-dependant executables #28

Merged
merged 1 commit into from
May 22, 2024
Merged

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented May 17, 2024

fixes #24

Yak Shave

Oddly the publish command fails, but the apps work fine. Setting UseAppHost to true results in more files than we need and unnecessarily binds the executable to Explore.Cli.Dll which we don't want.

the above true condition is a yak shave, 
/usr/local/share/dotnet/sdk/7.0.409/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(111,5): 
error NETSDK1098: Applications published to a single-file are required to use the application host. 
You must either set PublishSingleFile to false or set UseAppHost to true.

I think it is this bug

dotnet/runtime#79948

We are mitigating the fact that the job can pass with an app that has actually failed to build, by testing each of the output executables on end user machines (with exception to win-arm64 as we have no CI capabilities afforded by GH), which if these fail, will block the release

Linux

Caveats for linux users.

(can be mitigated by move to .NET 8 - ref to static linking)

Requirements

  • libicu - musl and glibc based systems
  • musl based systems gcc

Alpine

apk add gcc icu

Debian

apt update && apt install -y libicu

MacOS

Dynamically linked to only system libraries

X64

bin/hello_dotnet-osx-x64/Explore.Cli:
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
        /System/Library/Frameworks/GSS.framework/Versions/A/GSS (compatibility version 1.0.0, current version 1.0.0)
        /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1856.105.0)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1856.105.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60157.60.19)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1141.1.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)
        /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

ARM64

bin/hello_dotnet-osx-arm64/Explore.Cli:
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
        /System/Library/Frameworks/GSS.framework/Versions/A/GSS (compatibility version 1.0.0, current version 1.0.0)
        /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1856.105.0)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1856.105.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60157.60.19)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1141.1.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)
        /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

Windows

X64

Tested on MacOS M1 with Parallels Windows Instance

ARM64

Tested on MacOS M1 with Parallels Windows Instance

@YOU54F
Copy link
Member Author

YOU54F commented May 21, 2024

Elected for releases on workflow_dispatch using the generated MajorMinorPatch version from the git commit step which should keep in lock step with the manual dispatches done for NuGet.

We can improve on that in a later interation.

Will publish gzipped files, with shasums to gh releases under tag example 0.5.0

@YOU54F YOU54F marked this pull request as ready for review May 21, 2024 16:50
@YOU54F YOU54F requested a review from frankkilcommins May 21, 2024 16:57
Standalone releases of the Explore.CLI tool are published to GitHub Releases.

## Supported Platforms

| OS      | Architecture | Supported  |
| ------- | ------------ | ---------  |
| OSX     | x86_64       | ✅         |
| Linux   | x86_64       | ✅         |
| Windows | x86_64       | ✅         |
| OSX     | arm64        | ✅         |
| Linux   | arm64        | ✅         |
| Windows | arm64        | ✅         |
| Alpine  | x86_64       | ✅         |
| Alpine  | arm64        | ✅         |

### Linux

Caveats for linux users.

Requirements

  - `libicu` - `musl` and `glibc` based systems
  - `musl` based systems `gcc`

#### Alpine

  `apk add gcc icu`

#### Debian

  `apt update && apt install -y libicu`
@YOU54F
Copy link
Member Author

YOU54F commented May 22, 2024

Full publish wf on fork, triggered by workflow_dispatch - https://github.com/YOU54F/explore-cli/actions/runs/9191667420

GH release on fork - https://github.com/YOU54F/explore-cli/releases/tag/0.5.0

Copy link
Member

@frankkilcommins frankkilcommins left a comment

Choose a reason for hiding this comment

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

LGTM

@frankkilcommins frankkilcommins merged commit 5c47fd4 into main May 22, 2024
10 checks passed
@YOU54F YOU54F deleted the executables branch September 26, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create self-contained OS/chipset specific CLI versions
2 participants