Skip to content

Commit 2d5b7b2

Browse files
committed
Pull all files from GitHub directly, except for mod bundles
1 parent d50a247 commit 2d5b7b2

6 files changed

Lines changed: 43 additions & 9 deletions

File tree

.github/tas-check/1-get-build-url.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ while [ "${BUILD_ID}" == "" ]; do
1515
BUILD_ID=`get_build_id "$1"`
1616
done
1717

18-
mkdir /tmp/everest-pr-tas-check
18+
mkdir -p /tmp/everest-pr-tas-check
1919
echo -n "https://dev.azure.com/EverestAPI/Everest/_apis/build/builds/${BUILD_ID}/artifacts?artifactName=main&api-version=5.0&%24format=zip" > /tmp/everest-pr-tas-check/download-link.txt

.github/tas-check/2-1-install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22
# Installs Everest from the branch to test, CelesteTAS and the mod that is going to be TASed.
3-
# Parameter: mod ID of the mod to be TASed
3+
# Parameters: ID of the mod to be TASed, URL of the TAS files
44

55
set -xeo pipefail
66

77
docker build \
88
--build-arg "MAIN_BUILD_URL=`cat /tmp/everest-pr-tas-check/download-link.txt`" \
9+
--build-arg "TAS_FILES_URL=$2" \
910
--build-arg "TAS_TO_RUN=$1" \
1011
-t celeste .

.github/tas-check/2-2-install-inner.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ chmod -v u+x MiniInstaller-linux
2121

2222
# download TAS files
2323
cd ..
24-
curl --fail -Lo t.zip "https://celestemodupdater.0x0a.de/pinned-mods/TAS-Files-${TAS_TO_RUN}.zip"
24+
curl --fail -Lo t.zip "${TAS_FILES_URL}"
2525
unzip t.zip
2626
rm -v t.zip
2727

28-
# install CelesteTAS (https://maddie480.ovh/celeste/dl?id=CelesteTAS&mirror=1)
28+
# install CelesteTAS
2929
cd celeste/Mods
30-
curl --fail -Lo CelesteTAS.zip "https://celestemodupdater.0x0a.de/pinned-mods/CelesteTAS.zip"
30+
curl --fail -Lo CelesteTAS.zip "https://github.com/EverestAPI/CelesteTAS-EverestInterop/releases/download/v3.45.1/CelesteTAS.zip"
3131

3232
# install the mod that is going to be TASed, downloaded as a bundle zip containing the mod zip
3333
# and all of its dependencies (https://maddie480.ovh/celeste/bundle-download?id=${TAS_TO_RUN})

.github/tas-check/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM max480/everest:vanilla
22

3-
ARG MAIN_BUILD_URL TAS_TO_RUN
3+
ARG MAIN_BUILD_URL TAS_FILES_URL TAS_TO_RUN
44
COPY 2-2-install-inner.sh /tmp
55
RUN /tmp/2-2-install-inner.sh && rm /tmp/2-2-install-inner.sh

.github/tas-check/run-locally.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
# Builds and runs the TAS locally, calling the same scripts as the pipeline in order to test them.
3+
# Requires Docker and jq.
4+
5+
if [ "$1" == "" ] || [ "$2" == "" ]; then
6+
echo "Usage: ./run-locally.sh [Celeste|StrawberryJam2021] [commit SHA]"
7+
exit 1
8+
fi
9+
10+
set -xeo pipefail
11+
12+
case "$1" in
13+
"Celeste")
14+
TAS_URL="https://github.com/VampireFlower/CelesteTAS/archive/60b1680e61e43ec4681d7c9053d249491e0fe905.zip"
15+
TAS_PATH="CelesteTAS-60b1680e61e43ec4681d7c9053d249491e0fe905/0 - 100%.tas"
16+
;;
17+
18+
"StrawberryJam2021")
19+
TAS_URL="https://github.com/VampireFlower/StrawberryJamTAS/archive/0f0c6ee2112a2189b8d574704028db2fd37ee05e.zip"
20+
TAS_PATH="StrawberryJamTAS-0f0c6ee2112a2189b8d574704028db2fd37ee05e/0-SJ All Levels.tas"
21+
;;
22+
23+
*)
24+
echo "Unknown TAS: $1"
25+
exit 1
26+
esac
27+
28+
cd "`dirname "$0"`"
29+
./1-get-build-url.sh "$2"
30+
./2-1-install.sh "$1" "${TAS_URL}"
31+
./3-run.sh "${TAS_PATH}"

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ jobs:
1111
tas:
1212
- name: Celeste 100%
1313
mod: Celeste
14-
path: "CelesteTAS-master/0 - 100%.tas"
14+
url: "https://github.com/VampireFlower/CelesteTAS/archive/60b1680e61e43ec4681d7c9053d249491e0fe905.zip"
15+
path: "CelesteTAS-60b1680e61e43ec4681d7c9053d249491e0fe905/0 - 100%.tas"
1516

1617
- name: Strawberry Jam All Levels
1718
mod: StrawberryJam2021
18-
path: "StrawberryJamTAS-main/0-SJ All Levels.tas"
19+
url: "https://github.com/VampireFlower/StrawberryJamTAS/archive/0f0c6ee2112a2189b8d574704028db2fd37ee05e.zip"
20+
path: "StrawberryJamTAS-0f0c6ee2112a2189b8d574704028db2fd37ee05e/0-SJ All Levels.tas"
1921

2022
runs-on: ubuntu-latest
2123
timeout-minutes: 60
@@ -31,7 +33,7 @@ jobs:
3133
run: cd .github/tas-check && ./1-get-build-url.sh "${{ github.sha }}"
3234

3335
- name: Install Everest and ${{ matrix.tas.mod }}
34-
run: cd .github/tas-check && ./2-1-install.sh "${{ matrix.tas.mod }}"
36+
run: cd .github/tas-check && ./2-1-install.sh "${{ matrix.tas.mod }}" "${{ matrix.tas.url }}"
3537

3638
- name: Run TAS at ${{ matrix.tas.path }}
3739
run: cd .github/tas-check && ./3-run.sh "${{ matrix.tas.path }}"

0 commit comments

Comments
 (0)