From 668b31205b3169b10248514ec7ce291f8dd260eb Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 3 Oct 2023 19:44:05 -0700 Subject: [PATCH 1/4] use GitHub Pages --- .github/workflows/static.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..9def6107 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,36 @@ +name: Deploy Website + +on: + push: + branches: ["master", "s3-setup"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: './web/' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 From 7ced844a976af0279e20b4f1634fcd8907bf6e97 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sun, 8 Oct 2023 16:42:58 +0700 Subject: [PATCH 2/4] get files from Backblaze --- web/script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/script.js b/web/script.js index 4d2398a9..bd514943 100644 --- a/web/script.js +++ b/web/script.js @@ -2,6 +2,7 @@ (function() { "use strict"; + const host = "https://quic-interop-runner.s3.us-east-005.backblazeb2.com"; const map = { client: {}, server: {}, test: {} }; const color_type = { succeeded: "success", unsupported: "secondary disabled", failed: "danger"}; @@ -272,7 +273,7 @@ document.getElementsByTagName("body")[0].classList.add("loading"); var xhr = new XMLHttpRequest(); xhr.responseType = 'json'; - xhr.open('GET', 'logs/' + dir + '/result.json'); + xhr.open('GET', `${host}/${dir}/result.json`); xhr.onreadystatechange = function() { if(xhr.readyState !== XMLHttpRequest.DONE) return; if(xhr.status !== 200) { @@ -290,7 +291,7 @@ // enable loading of old runs var xhr = new XMLHttpRequest(); xhr.responseType = 'json'; - xhr.open('GET', 'logs/logs.json'); + xhr.open('GET', `${host}/logs.json`); xhr.onreadystatechange = function() { if(xhr.readyState !== XMLHttpRequest.DONE) return; if(xhr.status !== 200) { From 49339295227062e86ec16da130da5a142344bd1f Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 9 Oct 2023 12:55:48 +0700 Subject: [PATCH 3/4] load the latest run --- web/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/script.js b/web/script.js index bd514943..32641798 100644 --- a/web/script.js +++ b/web/script.js @@ -286,8 +286,6 @@ xhr.send(); } - load("latest"); - // enable loading of old runs var xhr = new XMLHttpRequest(); xhr.responseType = 'json'; @@ -299,6 +297,8 @@ return; } var s = document.createElement("select"); + // load the latest run + load(xhr.response[xhr.response.length-1]); xhr.response.reverse().forEach(function(el) { var opt = document.createElement("option"); opt.innerHTML = el.replace("logs_", ""); From ce4e45048a1952dd58f9e243359aeb558e8cd54c Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 9 Oct 2023 12:58:17 +0700 Subject: [PATCH 4/4] fix link to logs --- web/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/script.js b/web/script.js index 32641798..c7c2ea86 100644 --- a/web/script.js +++ b/web/script.js @@ -25,7 +25,7 @@ a.className = "btn btn-xs btn-" + color_type[res] + " " + res + " test-" + text.toLowerCase(); var ttip_target = a; if (res !== "unsupported") { - a.href = "logs/" + log_dir + "/" + server + "_" + client + "/" + test; + a.href = `${host}/${log_dir}/${server}_${client}/${test}`; a.target = "_blank"; ttip += "

(Click for logs.)"; } else {