Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Schniz committed Jan 13, 2019
0 parents commit 45800d0
Show file tree
Hide file tree
Showing 100 changed files with 5,845 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .ci/esy-build-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Cross-platform set of build steps for building esy projects

steps:
- task: NodeTool@0
inputs:
versionSpec: '8.9'
- script: npm install -g [email protected]
displayName: 'npm install -g [email protected]'
- script: esy install
displayName: 'esy install'
- script: esy pesy
displayName: 'esy pesy'
- script: esy build
displayName: 'esy build'
- script: esy test
displayName: 'esy test'
- script: esy x NswApp.exe
displayName: 'Run the main binary'
- script: esy ls-libs
continueOnError: true
displayName: 'Show all libraries including this package lib'
- script: esy release
displayName: 'Test Creation of Prebuilt Binary Releases'
continueOnError: true
11 changes: 11 additions & 0 deletions .ci/publish-build-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Steps for publishing project cache

steps:
- task: PublishBuildArtifacts@1
displayName: 'Cache: Upload install folder'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
pathToPublish: '$(ESY__CACHE_INSTALL_PATH)'
artifactName: 'cache-$(Agent.OS)-install'
parallel: true
parallelCount: 8
23 changes: 23 additions & 0 deletions .ci/restore-build-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Steps for restoring project cache

steps:
- task: DownloadBuildArtifacts@0
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: 'Cache: Restore install'
inputs:
buildType: 'specific'
project: '$(System.TeamProject)'
pipeline: '$(Build.DefinitionName)'
branchName: 'refs/heads/master'
buildVersionToDownload: 'latestFromBranch'
downloadType: 'single'
artifactName: 'cache-$(Agent.OS)-install'
downloadPath: '$(System.ArtifactsDirectory)'
continueOnError: true

- task: CopyFiles@2
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
sourceFolder: '$(System.ArtifactsDirectory)\cache-$(Agent.OS)-install'
targetFolder: '$(ESY__CACHE_INSTALL_PATH)'
continueOnError: true
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
npm-debug.log
.merlin
yarn-error.log
node_modules
node_modules/
_build
_release
_esy/
nsw.install
.DS_Store
*.install
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# nsw


[![CircleCI](https://circleci.com/gh/yourgithubhandle/nsw/tree/master.svg?style=svg)](https://circleci.com/gh/yourgithubhandle/nsw/tree/master)


**Contains the following libraries and executables:**

```
[email protected]
├─test/
│ name: TestNsw.exe
│ main: TestNsw
│ require: nsw.lib
├─library/
│ library name: nsw.lib
│ namespace: Nsw
│ require:
└─executable/
name: NswApp.exe
main: NswApp
require: nsw.lib
```

## Developing:

```
npm install -g esy
git clone <this-repo>
esy install
esy build
```

## Running Binary:

After building the project, you can run the main binary that is produced.

```
esy x NswApp.exe
```

## Running Tests:

```
# Runs the "test" command in `package.json`.
esy test
```
67 changes: 67 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

name: $(Build.SourceVersion)
jobs:
- job: Linux
timeoutInMinutes: 0
pool:
vmImage: 'Ubuntu 16.04'

variables:
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_____________________________________________________________________/i/
ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i

steps:
# TODO: Uncomment both this and 'publish-build-cache' below to enable build caching for Linux.
# - template: .ci/restore-build-cache.yml
- template: .ci/esy-build-steps.yml
# - template: .ci/publish-build-cache.yml

- job: MacOS
timeoutInMinutes: 0
pool:
vmImage: 'macOS 10.13'

variables:
ESY__CACHE_INSTALL_PATH: /Users/vsts/.esy/3____________________________________________________________________/i/
ESY__CACHE_SOURCE_TARBALL_PATH: /Users/vsts/.esy/source/i

steps:
# TODO: Uncomment both this and 'publish-build-cache' below to enable build caching for Mac.
# - template: .ci/restore-build-cache.yml
- template: .ci/esy-build-steps.yml
# - template: .ci/publish-build-cache.yml

- job: Windows
timeoutInMinutes: 0
pool:
vmImage: 'vs2017-win2016'

variables:
ESY__CACHE_INSTALL_PATH: C:\Users\VssAdministrator\.esy\3_\i
ESY__CACHE_SOURCE_TARBALL_PATH: C:\Users\VssAdministrator\.esy\source\i

steps:
- template: .ci/restore-build-cache.yml
- template: .ci/esy-build-steps.yml
- template: .ci/publish-build-cache.yml

- job: Release
timeoutInMinutes: 0
displayName: Release
dependsOn:
- Linux
- MacOS
- Windows
condition: succeeded()
pool:
vmImage: ubuntu-16.04
steps:
- task: PublishBuildArtifacts@1
displayName: 'Release Package'
inputs:
PathtoPublish: '.'
ArtifactName: npm-package
1 change: 1 addition & 0 deletions dune
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(dirs (:standard \ node_modules \ _esy))
2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(lang dune 1.6)
(name nsw)
3 changes: 3 additions & 0 deletions esy.lock/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# Set eol to LF so files aren't converted to CRLF-eol on Windows.
* text eol=lf
3 changes: 3 additions & 0 deletions esy.lock/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# Reset any possible .gitignore, we want all esy.lock to be un-ignored.
!*
Loading

0 comments on commit 45800d0

Please sign in to comment.