Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/revery-ui/revery
Browse files Browse the repository at this point in the history
  • Loading branch information
szbergeron committed Jan 25, 2020
2 parents bfa2a2d + 1ccda2b commit 44a51b7
Show file tree
Hide file tree
Showing 227 changed files with 7,218 additions and 2,073 deletions.
4 changes: 2 additions & 2 deletions .ci/esy-build-steps.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Cross-platform set of build steps for building esy projects

steps:
- script: npm install -g esy@0.5.8
displayName: 'npm install -g esy@0.5.8'
- script: npm install -g esy@0.6.0
displayName: 'npm install -g esy@0.6.0'
- script: esy install
displayName: 'esy install'
- script: esy build
Expand Down
4 changes: 2 additions & 2 deletions .ci/esy-check-hygiene.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Cross-platform set of build steps for building esy projects

steps:
- script: npm install -g esy@0.5.8
displayName: 'npm install -g esy@0.5.8'
- script: npm install -g esy@0.6.0
displayName: 'npm install -g esy@0.6.0'
- script: esy install
displayName: 'esy install'
- script: git diff --exit-code
Expand Down
29 changes: 28 additions & 1 deletion .ci/format.sh
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
find . -name "*.re" -type f -exec refmt --in-place {} \;
#!/usr/bin/env bash
OS=$1

dune build @fmt --auto-promote

caml_output=$?

if [[ $OS == "windows" ]]
then
files=$(/usr/bin/find $(pwd) -type f \( -iname \*.c -o -iname \*.h \) -not -path "*_esy/*")
native_output=$(astyle -n -Q --style=java --s4 $(cygpath -w $files))
elif [[ $OS == "darwin" ]]
then
native_output=$(find -E . -regex '.*\.(c|h)' -type f -not -path "*_esy/*" -exec astyle -n -Q --style=java --s4 {} \;)
elif [[ $OS == "linux" ]]
then
native_output=$(find ./ -type f \( -iname \*.c -o -iname \*.h \) -not -path "*_esy/*" -exec astyle -n -Q --style=java --s4 {} \;)
fi

if [[ $native_output ]]
then
printf "\nFormatted the following native stubs:\n%s" "$native_output"
fi

if [[ $caml_output != 0 ]] || [[ $native_output != "" ]]
then
exit 1
fi
20 changes: 14 additions & 6 deletions .ci/publish-build-cache.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# Steps for publishing project cache

steps:
- bash: 'mkdir -p $(STAGING_DIRECTORY_UNIX)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
- bash: 'mkdir -p $(STAGING_DIRECTORY)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: '[Cache][Publish] Create cache directory'

- bash: 'cd $(ESY__CACHE_INSTALL_PATH) && tar -czf $(STAGING_DIRECTORY_UNIX)/esy-cache.tar .'
- bash: |
cd $(ESY__CACHE_INSTALL_PATH)
pwd
STDIR=$STAGING_DIRECTORY
if [ "$AGENT_OS" == "Windows_NT" ]; then
STDIR=$( cygpath --unix --absolute "$STAGING_DIRECTORY")
fi
echo "STDIR: $STDIR"
tar -czf "$STDIR/esy-cache.tar" .
workingDirectory: ''
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: '[Cache][Publish] Tar esy cache directory'
# - bash: 'cd $(ESY__NPM_ROOT) && tar -czf $(STAGING_DIRECTORY_UNIX)/npm-cache.tar .'
# - bash: 'cd $(ESY__NPM_ROOT) && tar -czf $(STAGING_DIRECTORY)/npm-cache.tar .'
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# displayName: '[Cache][Publish] Tar npm cache directory'

- task: PublishBuildArtifacts@1
displayName: '[Cache][Publish] Upload tarball'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
pathToPublish: '$(STAGING_DIRECTORY)'
artifactName: 'cache-$(Agent.OS)-install'
Expand Down
20 changes: 14 additions & 6 deletions .ci/restore-build-cache.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Steps for restoring project cache

steps:
- bash: 'mkdir -p $(ESY__CACHE_INSTALL_PATH)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: '[Cache][Restore] Create cache directory'

- task: DownloadBuildArtifacts@0
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: '[Cache][Restore] Restore install'
Expand All @@ -19,12 +15,24 @@ steps:
downloadPath: '$(STAGING_DIRECTORY)'
continueOnError: true

# - bash: 'cd $(ESY__NPM_ROOT) && tar -xf $(STAGING_DIRECTORY_UNIX)/cache-$(Agent.OS)-install/npm-cache.tar -C .'
- bash: 'mkdir -p $(ESY__CACHE_INSTALL_PATH)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: '[Cache][Restore] Create cache directory'

# - bash: 'cd $(ESY__NPM_ROOT) && tar -xf $(STAGING_DIRECTORY)/cache-$(Agent.OS)-install/npm-cache.tar -C .'
# continueOnError: true
# condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
# displayName: '[Cache][Restore] Untar npm cache directory'

- bash: 'cd $(ESY__CACHE_INSTALL_PATH) && tar -xf $(STAGING_DIRECTORY_UNIX)/cache-$(Agent.OS)-install/esy-cache.tar -C .'
- bash: |
cd $(ESY__CACHE_INSTALL_PATH)
pwd
STDIR=$STAGING_DIRECTORY
if [ "$AGENT_OS" == "Windows_NT" ]; then
STDIR=$( cygpath --unix --absolute "$STAGING_DIRECTORY")
fi
echo "STDIR: $STDIR"
tar -xf "$STDIR/cache-$(Agent.OS)-install/esy-cache.tar" -C .
continueOnError: true
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: '[Cache][Restore] Untar esy cache directory'
Expand Down
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
# Hide lockfile updates
*esy.lock/* linguist-generated


# Recognize all re files as Reason
*.re linguist-language=Reason
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ _esy/

#macOS
.DS_Store

skia-c-example.png
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,9 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
- [wall](https://github.com/let-def/wall)
- [elm](https://elm-lang.org/)
- [reprocessing](https://github.com/Schmavery/reprocessing)

# Hot reload

We don't have a Hot Reload yet but it is on our roadmap. In the meantime, you can check branch [feat/hot-reload](https://github.com/revery-ui/revery/tree/feat/hot-reload) to see the progression.

In the meantime @mbernat has done a [script](https://gist.github.com/mbernat/abf651653c123374037c27377f41d0a0) that allow to relaunch the APP when the binary changed.
32 changes: 23 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,47 @@ jobs:
vmImage: 'Ubuntu 16.04'

variables:
STAGING_DIRECTORY: /home/vsts/STAGING
STAGING_DIRECTORY_UNIX: /home/vsts/STAGING
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_____________________________________________________________________/i
ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i
# ESY__NPM_ROOT: /opt/hostedtoolcache/node/8.14.0/x64/lib/node_modules/esy

steps:
- script: sudo apt-get update
- script: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-utils mesa-utils-extra ragel libgtk-3-dev
- script: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-utils mesa-utils-extra ragel libgtk-3-dev nasm
- template: .ci/use-node.yml
- template: .ci/restore-build-cache.yml
- template: .ci/esy-build-steps.yml
- template: .ci/esy-bench.yml
- template: .ci/create-docs.yml
- template: .ci/publish-build-cache.yml

- job: CentOS
displayName: 'Linux - CentOS - Docker Image'
timeoutInMinutes: 0
pool:
vmImage: 'Ubuntu 16.04'

variables:
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_____________________________________________________________________/i
ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i
# ESY__NPM_ROOT: /opt/hostedtoolcache/node/8.14.0/x64/lib/node_modules/esy

steps:
- script: docker build -t centos scripts/docker/centos
displayName: 'docker build'
- script: docker run --rm --mount src=`pwd`,target=/revery,type=bind centos /bin/bash -c 'cd revery && ls -a'
- script: docker run --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined --rm --mount src=`pwd`,target=/revery,type=bind centos /bin/bash -c 'cd revery && ./scripts/docker-build.sh'

- job: Hygiene_Checks
displayName: 'Hygiene Checks'
timeoutInMinutes: 0
pool:
vmImage: 'macOS 10.13'

variables:
STAGING_DIRECTORY: /Users/runner/STAGING
STAGING_DIRECTORY_UNIX: /Users/runner/STAGING
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /Users/runner/.esy/3__________________________________________________________________/i
ESY__CACHE_SOURCE_TARBALL_PATH: /Users/runner/.esy/source/i
# ESY__NPM_ROOT: /usr/local/lib/node_modules/esy
Expand All @@ -54,8 +70,7 @@ jobs:
vmImage: 'macOS 10.13'

variables:
STAGING_DIRECTORY: /Users/runner/STAGING
STAGING_DIRECTORY_UNIX: /Users/runner/STAGING
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /Users/runner/.esy/3__________________________________________________________________/i
ESY__CACHE_SOURCE_TARBALL_PATH: /Users/runner/.esy/source/i
# ESY__NPM_ROOT: /usr/local/lib/node_modules/esy
Expand All @@ -75,8 +90,7 @@ jobs:
vmImage: 'vs2017-win2016'

variables:
STAGING_DIRECTORY: C:\Users\VssAdministrator\STAGING
STAGING_DIRECTORY_UNIX: /C/Users/VssAdministrator/STAGING
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /C/Users/VssAdministrator/.esy/3_/i
ESY__CACHE_SOURCE_TARBALL_PATH: /C/Users/VssAdministrator/.esy/source/i
# ESY__NPM_ROOT: /C/npm/prefix/node_modules/esy
Expand Down
2 changes: 1 addition & 1 deletion bench.esy.lock/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 44a51b7

Please sign in to comment.