Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
Package restore and compilation caching work.
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Aug 31, 2015
1 parent 9caf160 commit 89e3560
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 31 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ before_install:

install:
- export NODEJS=$(dirname `nvm which $NODEJS_VERSION`)
- ci/download-asset.sh packages .
- nuget restore JSIL.sln
- ci/upload-asset.sh packages packages &
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner

script:
- xbuild /p:Configuration=Release /p:Platform=NoXna /v:m JSIL.sln
- ci/download-compile-cache.sh
- ci/download-asset.sh compilecache /
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./bin/Tests.DCE.dll ./bin/SimpleTests.dll ./bin/Tests.dll --run:$TestRun --exclude:FailsOnMono\|\(FailsOnMonoWhenStubbed+Stubbed\)\|\(FailsOnMonoWhenStubbed+Translated\)
- ci/upload-compile-cache.sh
- ci/upload-asset.sh compilecache "/tmp/JSIL Tests"

env:
global:
Expand Down
9 changes: 9 additions & 0 deletions ci/download-asset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

SUBTAG=$1
DESTDIR=$2
ZIPFILE=/tmp/$SUBTAG.zip

curl -s -S "jsil.org/ci/download.aspx?key=travisci&tag=$JSIL_STORAGE_TAG-$SUBTAG&password=$JSIL_STORAGE_PASSWORD" -o $ZIPFILE
unzip -q -o $ZIPFILE -d "$DESTDIR"
rm -rf "$DESTDIR/$SUBTAG/$SUBTAG"
9 changes: 0 additions & 9 deletions ci/download-compile-cache.sh

This file was deleted.

11 changes: 11 additions & 0 deletions ci/upload-asset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

SUBTAG=$1
SOURCEDIR=$2
ZIPFILE=/tmp/$SUBTAG.zip

echo "Uploading $SUBTAG..."
rm $ZIPFILE
zip -3 -r -q $ZIPFILE "$SOURCEDIR"
curl -S -X POST "jsil.org/ci/upload.aspx?key=travisci&tag=$JSIL_STORAGE_TAG-$SUBTAG&password=$JSIL_STORAGE_PASSWORD" --data-binary "@$ZIPFILE"
echo "Done uploading $SUBTAG."
9 changes: 0 additions & 9 deletions ci/upload-compile-cache.sh

This file was deleted.

12 changes: 9 additions & 3 deletions jsil.org/ci/download.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,29 @@
public partial class DownloadPage : JSONPage {
protected void Page_Load (object sender, EventArgs e) {
if (Request.RequestType != "GET") {
Fail("Request must be a GET");
Response.Clear();
Response.StatusCode = 400;
return;
}

string targetPath;
if (!SetupRequest(out targetPath))
if (!SetupRequest(out targetPath)) {
Response.Clear();
Response.StatusCode = 400;
return;
}

if (!File.Exists(targetPath)) {
Fail("File not found");
Response.Clear();
Response.StatusCode = 404;
return;
}

Response.Clear();
Response.StatusCode = 200;
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileName(targetPath) + "\"");
Response.Buffer = false;
Response.Flush();

using (var fileStream = File.OpenRead(targetPath))
Expand Down
7 changes: 0 additions & 7 deletions jsil.org/ci/upload.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@

public partial class UploadPage : JSONPage {
protected void Page_Load (object sender, EventArgs e) {
/*
if (Request.RequestType != "POST") {
Fail("Request must be a POST");
return;
}
*/

string targetPath;
if (!SetupRequest(out targetPath))
return;
Expand Down
10 changes: 9 additions & 1 deletion jsil.org/ci/web.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<configuration>
<system.web>
<httpRuntime requestValidationMode="2.0" />
<httpRuntime maxRequestLength="128000" executionTimeout="600" requestValidationMode="2.0" />
<pages validateRequest="false" />
<customErrors mode="Off" />
<compilation debug="true">
</compilation>
</system.web>
<system.webServer>
<asp enableChunkedEncoding="true"/>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

0 comments on commit 89e3560

Please sign in to comment.