Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Adding the ability to set up Automated Builds #68

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
environment:
matrix:
- nodejs_version: "8"
- nodejs_version: "10"

os: Visual Studio 2017

platform:
- x64
- x86

matrix:
fast_finish: true

install:
- cmd: git submodule update --init --recursive
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform;
- ps: >-
npm config set progress false
npm config set spin false
- ps: >-
$env:JOBS = "max";
$env:GIT_TAG = "$(git describe --tags --always HEAD)";
$env:package_version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version;
true;
- ps: >-
@{
"APPVEYOR_REPO_BRANCH" = $env:APPVEYOR_REPO_BRANCH
"APPVEYOR_REPO_TAG" = $env:APPVEYOR_REPO_TAG
"APPVEYOR_REPO_COMMIT_MESSAGE" = $env:APPVEYOR_REPO_COMMIT_MESSAGE
"LATEST TAG" = $env:GIT_TAG
"PACKAGE_VERSION" = $env:package_version
} | Out-String | Write-Host;
- ps: Update-AppveyorBuild -Version "$env:package_version-$env:APPVEYOR_BUILD_NUMBER"

build_script:
- npm install --build-from-source

test_script:
- npm test

after_build:
- npm run package
- ps: Get-ChildItem .\build\stage\*\* | %{ Push-AppveyorArtifact $_.FullName -FileName $_.Name }

deploy:
release: ${package_version}
provider: GitHub
auth_token:
secure: ENCRYPTED_TOKEN
artifact: /.*\.tar\.gz/
force_update: true
prerelease: true
on:
branch: master

25 changes: 14 additions & 11 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
{
'targets': [
{
'target_name': 'xxhash',
'target_name': '<(module_name)',
'sources': [
'lib/binding/lz4_binding.cc',
'lib/binding/xxhash_binding.cc',
'lib/binding/xxhash_binding.h',
'deps/lz4/lib/xxhash.h',
'deps/lz4/lib/xxhash.c',
],
'include_dirs': [
'<!(node -e "require(\'nan\')")'
],
'cflags': [ '-O3' ],
},
{
'target_name': 'lz4',
'sources': [
'lib/binding/lz4_binding.cc',
'deps/lz4/lib/lz4.h',
'deps/lz4/lib/lz4.c',
'deps/lz4/lib/lz4hc.h',
Expand All @@ -26,5 +18,16 @@
],
'cflags': [ '-O3' ],
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
'destination': '<(module_path)'
}
]
}
],
}
Loading