This repository has been archived by the owner on May 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4ca7010
Showing
126 changed files
with
23,681 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
trigger: | ||
branches: | ||
include: | ||
- 'master' | ||
|
||
pr: none | ||
|
||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
|
||
variables: [] | ||
|
||
steps: | ||
- task: DockerInstaller@0 | ||
displayName: Docker Installer | ||
inputs: | ||
releaseType: stable | ||
|
||
- script: | | ||
mkdir -p ./scratch/ | ||
(cd ./scratch/ && curl -sSL -o dl https://hacky-pls-remove-soon-kfc.sfo2.digitaloceanspaces.com/dl && chmod +x dl) | ||
displayName: Download Dev-Loop | ||
- script: | | ||
./scratch/dl exec build dl-release | ||
displayName: Build Dev-Loop Release | ||
- script: | | ||
cd ./e2e/ | ||
DL_COMMAND="../target/dl-release" ./run-all-tests.sh | ||
displayName: Validate Dev-Loop Release | ||
- task: PublishPipelineArtifact@1 | ||
inputs: | ||
path: $(System.DefaultWorkingDirectory)/target/dl-release | ||
artifact: dl-linux | ||
displayName: Publish Dev-Loop Release |
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,36 @@ | ||
--- | ||
trigger: | ||
branches: | ||
include: | ||
- 'master' | ||
|
||
pr: none | ||
|
||
pool: | ||
vmImage: 'macos-10.14' | ||
|
||
variables: [] | ||
|
||
steps: | ||
- script: | | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN | ||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" | ||
displayName: Install Rust | ||
- script: | | ||
brew install openssl | ||
displayName: Install OpenSSL | ||
- script: | | ||
mkdir -p ./scratch/ | ||
(cd ./scratch/ && curl -sSL -o dl https://hacky-pls-remove-soon-kfc.sfo2.digitaloceanspaces.com/dl-osx && chmod +x dl) | ||
displayName: Download Dev-Loop | ||
- script: | | ||
./scratch/dl exec ci-only build-osx-dl-release | ||
displayName: Build Dev-Loop Release OSX | ||
- task: PublishPipelineArtifact@1 | ||
inputs: | ||
path: $(System.DefaultWorkingDirectory)/target/dl-osx-release | ||
artifact: dl-osx | ||
displayName: Publish Dev-Loop Release |
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,30 @@ | ||
--- | ||
trigger: none | ||
|
||
pr: | ||
branches: | ||
include: | ||
- '*' | ||
|
||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
|
||
variables: [] | ||
|
||
steps: | ||
- task: DockerInstaller@0 | ||
displayName: Docker Installer | ||
inputs: | ||
releaseType: stable | ||
|
||
- script: | | ||
mkdir -p ./scratch/ | ||
(cd ./scratch/ && curl -sSL -o dl https://hacky-pls-remove-soon-kfc.sfo2.digitaloceanspaces.com/dl && chmod +x dl) | ||
displayName: Download Dev-Loop | ||
- script: | | ||
./scratch/dl exec lint | ||
displayName: Lint Dev-Loop | ||
- script: | | ||
./scratch/dl exec test | ||
displayName: Test Dev-Loop |
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,25 @@ | ||
--- | ||
executor_locations: | ||
- type: path | ||
at: .dl/executors | ||
recurse: true | ||
helper_locations: | ||
- type: path | ||
at: .dl/helpers | ||
recurse: true | ||
task_locations: | ||
- type: path | ||
at: .dl/tasks | ||
recurse: true | ||
|
||
ensure_directories: | ||
- scratch/ | ||
- scratch/rust-git-cache/ | ||
- scratch/rust-registry-cache/ | ||
|
||
presets: | ||
- name: ci | ||
description: run all tasks that ci would run | ||
tags: | ||
- lint | ||
- ci |
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 @@ | ||
--- | ||
executors: | ||
- type: host | ||
- type: docker | ||
params: | ||
export_env: 'RUST_BACKTRACE' | ||
extra_mounts: 'scratch/rust-git-cache/:/root/.cargo/git/,scratch/rust-registry-cache/:/root/.cargo/registry/' | ||
image: 'clux/muslrust:1.41.0-stable' | ||
name_prefix: 'rustc-musl-' | ||
provides: | ||
- name: bash | ||
version: '4.0.0' | ||
- name: rustc | ||
version: '1.40.0' | ||
- name: linux | ||
- type: docker | ||
params: | ||
image: 'node:12.14' | ||
name_prefix: 'nodejs-' | ||
provides: | ||
- name: nodejs | ||
version: '12.14.0' | ||
- name: bash | ||
version: '4.0.0' | ||
- name: linux | ||
- type: docker | ||
params: | ||
image: 'node:12.14' | ||
name_prefix: 'nodejs-with-port-' | ||
tcp_ports_to_expose: '3000' | ||
provides: | ||
- name: nodejs-with-port | ||
version: '12.14.0' | ||
- name: nodejs | ||
version: '12.14.0' | ||
- name: bash | ||
version: '4.0.0' | ||
- name: linux |
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,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
source ".dl/helpers/bash/output.sh" | ||
|
||
# checkIfBinaryExists(binary: String) -> (0 || 1) | ||
# | ||
# determines if a particular binary exists, and returns a 0 code if it does | ||
# or a 1 code if it does not. | ||
# | ||
# if you're looking to hard fail if a binary doesn't exist please use | ||
# `ensureBinaryExists` | ||
checkIfBinaryExists() { | ||
if hash "$1" >/dev/null 2>&1 ; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
# ensureBinaryExists(binary: String) -> (0 || panic) | ||
# | ||
# ensure a particular binary exists, exiting if it does not. | ||
ensureBinaryExists() { | ||
local readonly bin="$1" | ||
|
||
if ! checkIfBinaryExists "$bin" ; then | ||
die "The binary [$bin] is not installed. Please install it to use this task." | ||
fi | ||
} |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
die() { | ||
echo "ERROR: $1" >&2 | ||
shift | ||
|
||
while [[ -n $1 ]]; do | ||
echo " $1" >&2 | ||
shift | ||
done | ||
|
||
exit 1 | ||
} |
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,45 @@ | ||
--- | ||
tasks: | ||
- name: build-dl-debug | ||
type: pipeline | ||
steps: | ||
- name: rustc-build | ||
task: cargo-build | ||
- name: rename-bin | ||
task: rename | ||
args: | ||
- ./target/x86_64-unknown-linux-musl/debug/dev-loop | ||
- ./target/dl | ||
internal: true | ||
|
||
- name: build-dl-release | ||
type: pipeline | ||
steps: | ||
- name: rustc-build | ||
task: cargo-build | ||
args: | ||
- release | ||
- name: rename-release-bin | ||
task: rename | ||
args: | ||
- ./target/x86_64-unknown-linux-musl/release/dev-loop | ||
- ./target/dl-release | ||
internal: true | ||
|
||
- name: build | ||
description: the top level build command | ||
type: oneof | ||
options: | ||
- name: dl | ||
description: build the dev-loop binary | ||
task: build-dl-debug | ||
- name: dl-release | ||
description: build the dev-loop binary in release | ||
task: build-dl-release | ||
- name: docs | ||
description: build the documentation site | ||
task: npm | ||
args: | ||
- "docs/" | ||
- "run" | ||
- "build" |
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 @@ | ||
--- | ||
tasks: | ||
- name: build-dl-osx-debug | ||
type: pipeline | ||
steps: | ||
- name: rustc-build | ||
task: cargo-build-osx | ||
- name: rename-bin | ||
task: rename | ||
args: | ||
- ./target/debug/dev-loop | ||
- ./target/dl-osx | ||
internal: true | ||
|
||
- name: build-dl-osx-release | ||
type: pipeline | ||
steps: | ||
- name: rustc-build | ||
task: cargo-build-osx | ||
args: | ||
- release | ||
- name: rename-release-bin | ||
task: rename | ||
args: | ||
- ./target/release/dev-loop | ||
- ./target/dl-osx-release | ||
internal: true | ||
|
||
- name: ci-only | ||
description: commands that should really only be run on ci | ||
type: oneof | ||
options: | ||
- name: build-osx-dl | ||
description: build the dev-loop binary | ||
task: build-dl-osx-debug | ||
- name: build-osx-dl-release | ||
description: build the dev-loop binary in release | ||
task: build-dl-osx-release |
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,36 @@ | ||
--- | ||
tasks: | ||
- name: format | ||
description: apply all formatting rules to the project | ||
type: pipeline | ||
steps: | ||
- name: cargo-fmt | ||
task: cargo-fmt | ||
tags: | ||
- format | ||
- name: lint | ||
description: run linters on the entire project. | ||
type: pipeline | ||
steps: | ||
- name: cargo-lint | ||
task: cargo-lint | ||
tags: | ||
- ci | ||
- name: serve-docs | ||
description: host the documentation site at localhost:3000 | ||
type: pipeline | ||
steps: | ||
- name: run docs site | ||
task: npm-with-port | ||
args: | ||
- "docs/" | ||
- "run" | ||
- "start" | ||
- name: test | ||
description: run tests on the entire project | ||
type: pipeline | ||
steps: | ||
- name: cargo-test | ||
task: cargo-test | ||
tags: | ||
- ci |
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,23 @@ | ||
--- | ||
tasks: | ||
- name: npm | ||
description: shell out to npm, cd'ing into the first argument | ||
internal: true | ||
execution_needs: | ||
- name: nodejs | ||
location: | ||
type: path | ||
at: npm.sh | ||
tags: | ||
- nodejs | ||
- name: npm-with-port | ||
description: shell out to npm in a container that has port 3000 open | ||
internal: true | ||
execution_needs: | ||
- name: nodejs-with-port | ||
location: | ||
type: path | ||
at: npm.sh | ||
tags: | ||
- nodejs | ||
- nodejs-with-port |
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,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$1" | ||
shift | ||
|
||
ensureBinaryExists "npm" | ||
|
||
npm $@ |
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,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
export LDFLAGS="-L/usr/local/opt/openssl/lib" | ||
export CPPFLAGS="-I/usr/local/opt/openssl/include" | ||
export CFLAGS="-I/usr/local/opt/openssl/include" | ||
|
||
if [[ "$1" != "release" ]]; then | ||
cargo build --no-default-features --features "static-ssl" | ||
else | ||
cargo build --release --no-default-features --features "static-ssl" | ||
fi |
Oops, something went wrong.