Skip to content

Commit

Permalink
WIP: completely revamp buildchains (#89)
Browse files Browse the repository at this point in the history
* Refactor buildchians and use Fake.BuildTask DSL for easier build chain management.

* Fix typo in buildchain

* Name all Targets the same as the typed build task

* desperate CI fix again?

* Dont build CI packages
until packet pack works with conditional frameworks or we dont need conditional frameworks anymore

* Run dotnet restore befor starting buildchains

* Migrate Doc building to new generator script

* Update docs to reflect changes to buildchains
  • Loading branch information
kMutagene authored Apr 10, 2020
1 parent 934e855 commit 4e1bf25
Show file tree
Hide file tree
Showing 183 changed files with 1,284 additions and 17,443 deletions.
17 changes: 14 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,25 @@ Here is a brief overview of our main projects (also available [here](https://git

### Build process

Our F# projects use the [ProjectScaffold](https://github.com/fsprojects/ProjectScaffold) layout. To build our projects, you will need [.NET Core SDK](https://dotnet.microsoft.com/download) and an installation of [FAKE5 CLI]().
Most of our F# projects use the [ProjectScaffold](https://github.com/fsprojects/ProjectScaffold) layout. To build our projects, you will need [.NET Core SDK](https://dotnet.microsoft.com/download) and an installation of [FAKE5 CLI]().

However, the world of F# project scaffolding is in turmoil atm, and we are migrating to the modern toolchains when we see them fit and they are somewhat stable. Here are some of the uncomplete changes that we have at least partially adapted:

- all projects _should_ have a .config/dotnet-tools.json manifest that tracks the needed local dotnet tools to build the project. If they are missing, file a PR please!

- In projects where we cant use simple build chains, we use the [Fake.BuildTask DSL](https://github.com/vbfox/FoxSharp/blob/master/src/BlackFox.Fake.BuildTask/Readme.md) to have easier control over soft dependencies and target order

- The automated documentation generation using generator scripts and FSharp.Formatting seems to work again and we move away from our temporary fix.

All projects have at least the following build targets:

|Target|Description|Command Line Arguments|
|---|---|---|
|Build|Builds the binaries and docs|fake build|
|ReleaseLocal|Uses Build. Afterwards creates a folder structure so you can see the docs with proper style and relative paths in temp/localDocs. Use this to test documentation. | fake build --target releaselocal|
|`All`|Builds the binaries, packages, and docs. runs tests|build.cmd/build.sh/fake build (it is the default target)|
|`fullBuildChainLocal`|The same as `All` in Fake.BuildTask form|build.cmd/build.sh/fake build (it is the default build task)|
|`ReleaseLocal`|Uses Build. Afterwards creates a folder structure so you can see the docs with proper style and relative paths in temp/localDocs. Use this to test documentation. | build.cmd/build.sh/fake build -t releaselocal|
|`buildLocalDocs`|The same as `ReleaseLocal` in Fake.BuildTask form| build.cmd/build.sh/fake build -t buildLocalDocs|


## How can i contribute?

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotnet : 3.1

script:
- chmod +x ./build.sh
- ./build.sh -t Mono
- ./build.sh -t monoBuildChainCI

branches:
only:
Expand Down
4 changes: 2 additions & 2 deletions BioFSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "BioFSharp", "src\BioFSharp\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}"
ProjectSection(SolutionItems) = preProject
.config\dotnet-tools.json = .config\dotnet-tools.json
LICENSE = LICENSE
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175-43B1-4C90-A1EE-8E351C33435D}"
ProjectSection(SolutionItems) = preProject
docsrc\tools\formatters.fsx = docsrc\tools\formatters.fsx
docsrc\tools\generate.fsx = docsrc\tools\generate.fsx
docsrc\tools\templates\template.cshtml = docsrc\tools\templates\template.cshtml
EndProjectSection
Expand All @@ -35,7 +37,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D
docsrc\content\BioID.fsx = docsrc\content\BioID.fsx
docsrc\content\BioItem.fsx = docsrc\content\BioItem.fsx
docsrc\content\BioTools-tmhmm.fsx = docsrc\content\BioTools-tmhmm.fsx
docsrc\content\Blast.fsx = docsrc\content\Blast.fsx
docsrc\content\BlastWrapper.fsx = docsrc\content\BlastWrapper.fsx
docsrc\content\Clustal.fsx = docsrc\content\Clustal.fsx
docsrc\content\ClustalOWrapper.fsx = docsrc\content\ClustalOWrapper.fsx
Expand Down Expand Up @@ -84,7 +85,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", ".build", "{7C6D08
appveyor.yml = appveyor.yml
build.cmd = build.cmd
build.fsx = build.fsx
build.proj = build.proj
build.sh = build.sh
EndProjectSection
EndProject
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ for:
- image: Visual Studio 2019

build_script:
- cmd: build.cmd
- cmd: build.cmd -t fullBuildChainCI
-
matrix:
only:
- image: Ubuntu

build_script:
- chmod +x ./build.sh
- sh: ./build.sh -t Dotnet
- sh: ./build.sh -t dotnetBuildChainCI

test: off
version: 0.0.1.{build}
Expand Down
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
cls

dotnet tool restore
dotnet restore
dotnet paket restore
dotnet restore build.proj
dotnet fake build %*
Loading

0 comments on commit 4e1bf25

Please sign in to comment.