-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Updated CI setup to assist issue #100 * Adds odoc Strictly speaking, not necessary for this PR. However, it's needed in future and keeping the CI setup close to hello-reason helps in maintenance * Build docs only for root
- Loading branch information
1 parent
6463aed
commit aeb5233
Showing
16 changed files
with
510 additions
and
138 deletions.
There are no files selected for viewing
This file contains 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 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,19 @@ | ||
# Cross-platform set of build steps for building esy projects | ||
|
||
steps: | ||
- template: utils/use-node.yml | ||
- template: utils/use-esy.yml | ||
- script: "esy install" | ||
displayName: "esy install" | ||
- template: utils/restore-build-cache.yml | ||
- script: "esy build" | ||
displayName: "esy build" | ||
- template: utils/create-docs.yml | ||
- script: "esy test" | ||
displayName: "Test command" | ||
- script: "esy release" | ||
displayName: "esy release" | ||
- template: utils/publish-build-cache.yml | ||
|
||
# Run tests or any additional steps here | ||
# - script: esy b dune runtest |
This file contains 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,38 @@ | ||
# Shared steps for building OPAM projects | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '8.9' | ||
- script: brew install gpatch | ||
displayName: 'brew install gpatch' | ||
- script: brew install opam | ||
displayName: 'brew install opam' | ||
- script: opam --version | ||
displayName: 'Check opam version' | ||
- script: opam init --auto-setup --dot-profile=~/.bash_profile | ||
displayName: 'opam init' | ||
- script: opam remote add ocamlorg https://opam.ocaml.org || true | ||
displayName: 'opam remote add ocamlorg' | ||
- script: opam remove default || true | ||
displayName: 'opam remove default' | ||
- script: opam update | ||
displayName: 'opam update' | ||
- script: opam switch create $(OCAML_VERSION) | ||
displayName: 'Use OCaml version: $(OCAML_VERSION)' | ||
- script: opam install -y dune | ||
displayName: 'opam install -y dune' | ||
- script: opam install -y menhir | ||
displayName: 'opam install -y menhir' | ||
- script: opam install -y utop | ||
displayName: 'opam install -y utop' | ||
- script: make clean-for-ci | ||
displayName: 'make clean-for-ci' | ||
- script: opam pin add -y reason . | ||
displayName: "opam pin add -y reason ." | ||
- script: opam pin add -y rtop . | ||
displayName: "opam pin add -y rtop ." | ||
- script: eval $(opam env); make test-ci | ||
displayName: "make test-ci" | ||
- script: git diff --exit-code | ||
displayName: "Check git is clean" |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
@@ -1,24 +1,37 @@ | ||
# Steps for publishing project cache | ||
|
||
steps: | ||
- bash: 'mkdir -p $(STAGING_DIRECTORY_UNIX)' | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
- bash: 'mkdir -p $(Build.StagingDirectory)' | ||
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI')) | ||
displayName: '[Cache][Publish] Create cache directory' | ||
|
||
- bash: 'cd $(ESY__CACHE_INSTALL_PATH) && tar -czf $(STAGING_DIRECTORY_UNIX)/esy-cache.tar .' | ||
workingDirectory: '' | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
displayName: '[Cache][Publish] Tar esy cache directory' | ||
# continueOnError because on windows it has a permission denied error but the | ||
# export succeeds. | ||
- script: "esy export-dependencies" | ||
continueOnError: true | ||
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI')) | ||
displayName: "esy export-dependencies" | ||
|
||
# - bash: 'cd $(ESY__NPM_ROOT) && tar -czf $(STAGING_DIRECTORY_UNIX)/npm-cache.tar .' | ||
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
- bash: pwd && ls _export/* && mv _export '$(Build.StagingDirectory)' && ls '$(Build.StagingDirectory)/_export/' | ||
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI')) | ||
displayName: '[Cache][Publish] move export to staging dir' | ||
|
||
# - bash: cd $ESY__CACHE_INSTALL_PATH && tar -czf $(Build.StagingDirectory)/esy-cache.tar . | ||
# workingDirectory: '' | ||
# condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI')) | ||
# displayName: '[Cache][Publish] Tar esy cache directory' | ||
|
||
# - bash: 'cd $(ESY__NPM_ROOT) && tar -czf $(Build.StagingDirectory)/npm-cache.tar .' | ||
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], variables['System.PullRequest.TargetBranch'])) | ||
# displayName: '[Cache][Publish] Tar npm cache directory' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: '[Cache][Publish] Upload tarball' | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI')) | ||
# TODO: The CI Build caches are pulled down by the last successful buildID | ||
# for the target branch. | ||
inputs: | ||
pathToPublish: '$(STAGING_DIRECTORY)' | ||
artifactName: 'cache-$(Agent.OS)-install' | ||
pathToPublish: '$(Build.StagingDirectory)' | ||
artifactName: 'cache-$(Agent.OS)-install-$(esy__ci_cache_version)' | ||
parallel: true | ||
parallelCount: 8 |
Oops, something went wrong.