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

Commit 89e3560

Browse files
committed
Package restore and compilation caching work.
1 parent 9caf160 commit 89e3560

8 files changed

+42
-31
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ before_install:
88

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

1416
script:
1517
- xbuild /p:Configuration=Release /p:Platform=NoXna /v:m JSIL.sln
16-
- ci/download-compile-cache.sh
18+
- ci/download-asset.sh compilecache /
1719
- 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\)
18-
- ci/upload-compile-cache.sh
20+
- ci/upload-asset.sh compilecache "/tmp/JSIL Tests"
1921

2022
env:
2123
global:

ci/download-asset.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
SUBTAG=$1
4+
DESTDIR=$2
5+
ZIPFILE=/tmp/$SUBTAG.zip
6+
7+
curl -s -S "jsil.org/ci/download.aspx?key=travisci&tag=$JSIL_STORAGE_TAG-$SUBTAG&password=$JSIL_STORAGE_PASSWORD" -o $ZIPFILE
8+
unzip -q -o $ZIPFILE -d "$DESTDIR"
9+
rm -rf "$DESTDIR/$SUBTAG/$SUBTAG"

ci/download-compile-cache.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

ci/upload-asset.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
SUBTAG=$1
4+
SOURCEDIR=$2
5+
ZIPFILE=/tmp/$SUBTAG.zip
6+
7+
echo "Uploading $SUBTAG..."
8+
rm $ZIPFILE
9+
zip -3 -r -q $ZIPFILE "$SOURCEDIR"
10+
curl -S -X POST "jsil.org/ci/upload.aspx?key=travisci&tag=$JSIL_STORAGE_TAG-$SUBTAG&password=$JSIL_STORAGE_PASSWORD" --data-binary "@$ZIPFILE"
11+
echo "Done uploading $SUBTAG."

ci/upload-compile-cache.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

jsil.org/ci/download.aspx.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,29 @@
55
public partial class DownloadPage : JSONPage {
66
protected void Page_Load (object sender, EventArgs e) {
77
if (Request.RequestType != "GET") {
8-
Fail("Request must be a GET");
8+
Response.Clear();
9+
Response.StatusCode = 400;
910
return;
1011
}
1112

1213
string targetPath;
13-
if (!SetupRequest(out targetPath))
14+
if (!SetupRequest(out targetPath)) {
15+
Response.Clear();
16+
Response.StatusCode = 400;
1417
return;
18+
}
1519

1620
if (!File.Exists(targetPath)) {
17-
Fail("File not found");
21+
Response.Clear();
22+
Response.StatusCode = 404;
1823
return;
1924
}
2025

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

2733
using (var fileStream = File.OpenRead(targetPath))

jsil.org/ci/upload.aspx.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44

55
public partial class UploadPage : JSONPage {
66
protected void Page_Load (object sender, EventArgs e) {
7-
/*
8-
if (Request.RequestType != "POST") {
9-
Fail("Request must be a POST");
10-
return;
11-
}
12-
*/
13-
147
string targetPath;
158
if (!SetupRequest(out targetPath))
169
return;

jsil.org/ci/web.config

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<configuration>
22
<system.web>
3-
<httpRuntime requestValidationMode="2.0" />
3+
<httpRuntime maxRequestLength="128000" executionTimeout="600" requestValidationMode="2.0" />
44
<pages validateRequest="false" />
55
<customErrors mode="Off" />
66
<compilation debug="true">
77
</compilation>
88
</system.web>
9+
<system.webServer>
10+
<asp enableChunkedEncoding="true"/>
11+
<httpProtocol>
12+
<customHeaders>
13+
<remove name="X-Powered-By" />
14+
</customHeaders>
15+
</httpProtocol>
16+
</system.webServer>
917
</configuration>

0 commit comments

Comments
 (0)