Compare commits

...

12 Commits

Author SHA1 Message Date
3fb21e590c 0.8.8 2017-02-04 14:26:41 +01:00
4376d3cefe fix typos, fix accelerometer 2017-02-04 14:26:21 +01:00
b31d6188f9 added jenkins 2017-02-03 16:19:22 -08:00
7a741622a9 0.8.7 2017-02-03 16:04:35 -08:00
a1104010e4 Bump pxt-core to 0.11.13 2017-02-03 16:04:32 -08:00
a39067a0f4 enable sharing 2017-02-03 16:03:17 -08:00
f2ccad6c26 0.8.6 2017-02-03 17:26:29 +01:00
8fe328b2e8 add some safety test codes to the production test 2017-02-03 17:26:04 +01:00
b984af2130 0.8.5 2017-02-02 23:23:55 -08:00
fcfcf901aa Bump pxt-core to 0.11.11 2017-02-02 23:23:52 -08:00
969ecee5b5 0.8.4 2017-02-02 23:16:33 -08:00
cd5e5d55bc Bump pxt-core to 0.11.10 2017-02-02 23:16:28 -08:00
8 changed files with 104 additions and 15 deletions

32
jenkins.groovy Normal file
View File

@ -0,0 +1,32 @@
import jobs.generation.Utilities;
import jobs.generation.InternalUtilities;
def project = GithubProject
def branch = GithubBranchName
[true, false].each { isPR ->
def newJobName = InternalUtilities.getFullJobName(project, "Default", isPR)
def newJob = job(newJobName) {
steps {
shell("./jenkins.sh ${isPR}")
}
if (!isPR) {
wrappers {
credentialsBinding {
string('PXT_ACCESS_TOKEN', 'pxt_access_token')
string('PXT_RELEASE_REPO', 'pxt_release_repo_calliope')
}
}
}
}
Utilities.setMachineAffinity(newJob, 'Ubuntu', '20161020')
InternalUtilities.standardJobSetup(newJob, project, isPR, "*/*")
if (isPR) {
Utilities.addGithubPRTrigger(newJob, "Default Testing")
} else {
Utilities.addGithubPushTrigger(newJob)
}
}

55
jenkins.sh Normal file
View File

@ -0,0 +1,55 @@
#!/usr/bin/env bash
# Set up NVM
export NVM_DIR="/home/dotnet-bot/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install 5
# Set up build environment variables
echo ---------- Setting build environment variables
echo Git branch: $GIT_BRANCH
echo isPR: $1
originRegex="^origin/.*"
branchRegex="^origin/\K.*(?=$)"
if [[ "$GIT_BRANCH" =~ $originRegex ]]; then
branchName=$(echo ${GIT_BRANCH} | grep -oP $branchRegex)
echo Setting TRAVIS_BRANCH to ${branchName}
export TRAVIS_BRANCH=${branchName}
else
echo Setting TRAVIS_BRANCH to $GIT_BRANCH
export TRAVIS_BRANCH=$GIT_BRANCH
fi
if [ "$1" == "false" ]; then
echo Setting TRAVIS_PULL_REQUEST to false
export TRAVIS_PULL_REQUEST=false
if [ $TRAVIS_BRANCH == "master" ]; then
if [[ -z $PXT_RELEASE_REPO ]]; then
echo Cannot find release repo; skipping tag checks
else
gitTag=$(git describe --tags --exact-match 2> /dev/null)
builtTag=$(git ls-remote --tags $PXT_RELEASE_REPO | grep -o "refs/tags/$gitTag$")
echo Current tag: $gitTag
echo Built tag: $builtTag
if [[ ! -z $gitTag && -z $builtTag ]]; then
echo Built tag not found; building tag
echo Setting TRAVIS_BRANCH to $gitTag
export TRAVIS_BRANCH=$gitTag
echo Setting TRAVIS_TAG to $gitTag
export TRAVIS_TAG=$gitTag
else
echo Not a tag build
fi
fi
fi
fi
# Perform build
npm install
npm test

View File

@ -138,7 +138,7 @@ function getNoteName(frequency: number): string {
}
}
var notes = [
let notes = [
note(Note.E, BeatFraction.Quarter), note(Note.E, BeatFraction.Quarter), note(Note.F, BeatFraction.Quarter),
note(Note.G, BeatFraction.Quarter), note(Note.G, BeatFraction.Quarter), note(Note.F, BeatFraction.Quarter),
note(Note.E, BeatFraction.Quarter), note(Note.D, BeatFraction.Quarter), note(Note.C, BeatFraction.Quarter),
@ -166,8 +166,8 @@ var notes = [
note(Note.C, BeatFraction.Eighth), note(Note.C, BeatFraction.Half)
];
for (var t = 0; t < notes.length; t++) {
for (let t = 0; t < notes.length; t++) {
music.playTone(notes[t][0], notes[t][1]);
basic.showString(getNoteName(notes[t][0]));
music.rest(whole - notes[t][1]);
}
}

View File

@ -88,13 +88,13 @@
"PinPullMode.PullUp|block": "up",
"Rotation.Pitch|block": "pitch",
"Rotation.Roll|block": "roll",
"String.charAt|block": "char from %this|at %pos",
"String.compare|block": "compare %this| to %that",
"String.concat|block": "join %this|%other",
"String.charAt|block": "char from %this=text|at %pos",
"String.compare|block": "compare %this=text| to %that",
"String.concat|block": "join %this=text|%other",
"String.fromCharCode|block": "text from char code %code",
"String.isEmpty|block": "%this| is empty",
"String.isEmpty|block": "%this=text| is empty",
"String.length|block": "length of %VALUE",
"String.substr|block": "substring of %this|from %start|of length %length",
"String.substr|block": "substring of %this=text|from %start|of length %length",
"String|block": "String",
"basic.clearScreen|block": "clear screen",
"basic.color|block": "%c",

View File

@ -1,6 +1,6 @@
{
"name": "pxt-calliope",
"version": "0.8.3",
"version": "0.8.8",
"description": "Calliope Mini editor for PXT",
"keywords": [
"JavaScript",
@ -34,6 +34,9 @@
"semantic-ui-less": "^2.2.4"
},
"dependencies": {
"pxt-core": "0.10.15"
"pxt-core": "0.11.13"
},
"scripts": {
"test": "node node_modules/pxt-core/built/pxt.js travis"
}
}

View File

@ -15,7 +15,7 @@
"workspace": false,
"packages": true,
"sharing": true,
"publish": true,
"publishing": true,
"preferredPackages": [
],
"githubPackages": true
@ -170,7 +170,7 @@
"yottaTarget": "bbc-microbit-classic-gcc",
"yottaCorePackage": "microbit",
"githubCorePackage": "calliope-mini/microbit",
"gittag": "2.0.0-rc7-calliope-p2",
"gittag": "2.0.0-rc7-calliope-p6",
"serviceId": "microbit"
},
"serial": {

View File

@ -223,10 +223,10 @@ namespace pxsim {
return DAL.MICROBIT_ACCELEROMETER_EVT_TILT_UP;
if (this.getZ() < (-1000 + DAL.MICROBIT_ACCELEROMETER_TILT_TOLERANCE))
return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_UP;
return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_DOWN;
if (this.getZ() > (1000 - DAL.MICROBIT_ACCELEROMETER_TILT_TOLERANCE))
return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_DOWN;
return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_UP;
return 0;
}

View File

@ -7,4 +7,3 @@ export KS_FORCE_CLOUD=yes
(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js test)
(cd libs/lang-test1; node ../../node_modules/pxt-core/built/pxt.js test)
node node_modules/pxt-core/built/pxt.js testdir tests
(cd libs/hello; node ../../node_modules/pxt-core/built/pxt.js testconv https://az851932.vo.msecnd.net/files/td-converter-tests-v1.json)