-
Notifications
You must be signed in to change notification settings - Fork 75
Fake build project on .NET 9 #742
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
Open
xperiandri
wants to merge
7
commits into
master
Choose a base branch
from
fake-project
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1af4cad
feat(ci): Fake build project
xperiandri b0c6594
feat(ci): run `Fornax` to build docs
xperiandri 4ad7693
feat(ci): self check the solution
xperiandri c9ef3ba
refactor(ci): move `NuGet.config` package source mapping creation fro…
xperiandri 5789c96
feat(docs): resolve full paths to find `FSharpLint.Core.dll`
xperiandri 9b314f0
feat(ci): improve change log reading
xperiandri 44c5744
fixup! feat(ci): self check the solution
xperiandri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # [Choice] Debian version (use bullseye on local arm64/Apple Silicon): bookworm, bullseye, buster | ||
| ARG VARIANT="bookworm" | ||
| FROM buildpack-deps:${VARIANT}-curl | ||
|
|
||
|
|
||
| ENV \ | ||
| # Enable detection of running in a container | ||
| DOTNET_RUNNING_IN_CONTAINER=true \ | ||
| DOTNET_ROOT=/usr/share/dotnet/ \ | ||
| DOTNET_NOLOGO=true \ | ||
| DOTNET_CLI_TELEMETRY_OPTOUT=false\ | ||
| DOTNET_USE_POLLING_FILE_WATCHER=true | ||
|
|
||
|
|
||
| # [Optional] Uncomment this section to install additional OS packages. | ||
| # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
| # && apt-get -y install --no-install-recommends <your-package-list-here> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| { | ||
| "name": "dotnet", | ||
| // Set the build context one level higher so we can grab metadata like global.json | ||
| "context": "..", | ||
| "dockerFile": "Dockerfile", | ||
| "forwardPorts": [ | ||
| 0 | ||
| ], | ||
| "features": { | ||
| // https://github.com/devcontainers/features/blob/main/src/common-utils/README.md | ||
| "ghcr.io/devcontainers/features/common-utils:2": { | ||
| "installZsh": true, | ||
| "installOhMyZshConfig": true, | ||
| "configureZshAsDefaultShell": true, | ||
| "username": "vscode", | ||
| "userUid": "1000", | ||
| "userGid": "1000", | ||
| "upgradePackages": true | ||
| }, | ||
| // https://github.com/devcontainers/features/blob/main/src/github-cli/README.md | ||
| "ghcr.io/devcontainers/features/github-cli:1": {}, | ||
| // https://github.com/devcontainers-contrib/features/blob/main/src/starship/README.md | ||
| "ghcr.io/devcontainers-contrib/features/starship:1": {}, | ||
| // https://github.com/devcontainers/features/blob/main/src/dotnet/README.md | ||
| "ghcr.io/devcontainers/features/dotnet:2": { | ||
| "version": "9.0.201" | ||
| } | ||
| }, | ||
| "overrideFeatureInstallOrder": [ | ||
| "ghcr.io/devcontainers/features/common-utils", | ||
| "ghcr.io/devcontainers/features/github-cli", | ||
| "ghcr.io/devcontainers-contrib/features/starship", | ||
| "ghcr.io/devcontainers/features/dotnet" | ||
| ], | ||
| "customizations": { | ||
| "vscode": { | ||
| // Add the IDs of extensions you want installed when the container is created. | ||
| "extensions": [ | ||
| "ms-dotnettools.csharp", | ||
| "Ionide.Ionide-fsharp", | ||
| "tintoy.msbuild-project-tools", | ||
| "ionide.ionide-paket", | ||
| "usernamehw.errorlens", | ||
| "alefragnani.Bookmarks", | ||
| "oderwat.indent-rainbow", | ||
| "vscode-icons-team.vscode-icons", | ||
| "EditorConfig.EditorConfig", | ||
| "GitHub.vscode-pull-request-github", | ||
| "github.vscode-github-actions" | ||
| ], | ||
| "settings": { | ||
| "terminal.integrated.defaultProfile.linux": "zsh", | ||
| "csharp.suppressDotnetInstallWarning": true | ||
| } | ||
| } | ||
| }, | ||
| "remoteUser": "vscode", | ||
| "containerUser": "vscode", | ||
| "containerEnv": { | ||
| // Expose the local environment variable to the container | ||
| // They are used for releasing and publishing from the container | ||
| "GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}" | ||
| }, | ||
| "onCreateCommand": { | ||
| "enable-starship": "echo 'eval \"$(starship init zsh)\"' >> ~/.zshrc" | ||
| }, | ||
| "postAttachCommand": { | ||
| "restore": "dotnet tool restore && dotnet restore" | ||
| }, | ||
| "waitFor": "updateContentCommand" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,11 +36,14 @@ jobs: | |
| - name: Restore dependencies | ||
| run: dotnet restore | ||
| - name: Build | ||
| run: dotnet fsi build.fsx -t Build | ||
| shell: pwsh | ||
| run: ./build.ps1 DotnetBuild | ||
| - name: Run tests | ||
| run: dotnet fsi build.fsx -t Test | ||
| shell: pwsh | ||
| run: ./build.ps1 DotnetTest | ||
| - name: Run FSharpLint on itself | ||
| run: dotnet fsi build.fsx -t SelfCheck | ||
| shell: pwsh | ||
| run: ./build.ps1 SelfCheck | ||
|
|
||
|
|
||
| deployReleaseBinaries: | ||
|
|
@@ -56,46 +59,40 @@ jobs: | |
| - name: Restore tools | ||
| run: dotnet tool restore | ||
| - name: Build | ||
| run: dotnet fsi build.fsx | ||
| shell: pwsh | ||
| run: ./build.ps1 | ||
| - name: Pack | ||
| run: dotnet fsi build.fsx -t Pack | ||
| shell: pwsh | ||
| run: ./build.ps1 DotnetPack | ||
| - name: Publish binaries as artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: binaries | ||
| path: ./out/*.nupkg | ||
| path: ./dist/*.nupkg | ||
| - name: Get Changelog Entry | ||
| id: changelog_reader | ||
| uses: mindsers/changelog-reader-action@v1 | ||
| with: | ||
| version: ${{ github.ref }} | ||
| path: ./CHANGELOG.md | ||
| - name: Upload binaries to nuget (if nugetKey present) | ||
| - name: Publish (if tag) | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| shell: pwsh | ||
| env: | ||
| nuget-key: ${{ secrets.NUGET_KEY }} | ||
| NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: dotnet fsi build.fsx -t Push | ||
| - name: Create Release (if tag) | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| id: create_release | ||
| uses: actions/create-release@latest | ||
| FAKE_DETAILED_ERRORS: true | ||
|
|
||
| run: ./build.ps1 Publish | ||
|
|
||
| - name: PublishToGitHub (if master branch) | ||
| if: github.ref == 'refs/heads/master' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xperiandri this logic was moved in the past from GithubActions to F#, let's keep it in F# please |
||
| shell: pwsh | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
| with: | ||
| tag_name: ${{ github.ref }} | ||
| release_name: ${{ github.ref }} | ||
| body: ${{ steps.changelog_reader.outputs.log_entry }} | ||
| draft: false | ||
| prerelease: false | ||
| - name: Upload binaries to release (if tag) | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: svenstaro/upload-release-action@v2 | ||
| with: | ||
| repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
| file: out/*.nupkg | ||
| tag: ${{ github.ref }} | ||
| overwrite: true | ||
| file_glob: true | ||
| NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| FAKE_DETAILED_ERRORS: true | ||
| run: ./build.ps1 PublishToGitHub | ||
|
|
||
|
|
||
| deployReleaseDocs: | ||
|
|
@@ -114,7 +111,8 @@ jobs: | |
| - name: Restore dependencies | ||
| run: dotnet restore | ||
| - name: Run Fornax | ||
| run: dotnet fsi build.fsx -t Docs | ||
| shell: pwsh | ||
| run: ./build.ps1 BuildDocs | ||
| - name: Deploy (if tag) | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,6 @@ x86/ | |
| [Ww][Ii][Nn]32/ | ||
| [Aa][Rr][Mm]/ | ||
| [Aa][Rr][Mm]64/ | ||
| build/ | ||
| bld/ | ||
| [Bb]in/ | ||
| [Oo]bj/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "recommendations": [ | ||
| "ionide.ionide-fsharp", | ||
| "ionide.ionide-fake", | ||
| "ms-dotnettools.csharp", | ||
| "editorConfig.editorConfig" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "FSharp.fsacRuntime":"netcore", | ||
| "FSharp.enableAnalyzers": false, | ||
| "FSharp.analyzersPath": [ | ||
| "./packages/analyzers" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "solution": { | ||
| "path": "FSharpLint.slnx", | ||
| "projects": [ | ||
| "src\\FSharpLint.Console\\FSharpLint.Console.fsproj", | ||
| "src\\FSharpLint.Core\\FSharpLint.Core.fsproj", | ||
| "tests\\FSharpLint.Benchmarks\\FSharpLint.Benchmarks.fsproj", | ||
| "tests\\FSharpLint.Console.Tests\\FSharpLint.Console.Tests.fsproj", | ||
| "tests\\FSharpLint.Core.Tests\\FSharpLint.Core.Tests.fsproj", | ||
| "tests\\FSharpLint.FunctionalTest\\FSharpLint.FunctionalTest.fsproj" | ||
| ] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| dotnet run --project ./build/build.fsproj -- --target %* |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.