Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions cases/cloneScenario.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

# https://stackoverflow.com/a/28776166
(return 0 2>/dev/null) || (echo "This script should be sourced, not executed."; exit 1)

set -exo pipefail

# We're assuming that $PWD is the directory containing scenario.json.

SCENARIO_REPO=$1
SCENARIO_NAME=$(basename $PWD)
SOLUTION_DIR=../../solutions/$SCENARIO_NAME

if ! test -d $SOLUTION_DIR; then
git clone --filter blob:none $SCENARIO_REPO $SOLUTION_DIR
fi

cd $SOLUTION_DIR
git clean -fdx
git reset --hard HEAD

if test -z "$SCENARIO_REF"; then
SCENARIO_REF=$(git rev-parse HEAD)
echo "##vso[task.setvariable variable=SCENARIO_REF]$SCENARIO_REF"
else
git fetch origin $SCENARIO_REF
git switch --detach FETCH_HEAD
fi
13 changes: 13 additions & 0 deletions cases/scenarios/mui-docs-1/scenario.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "mui-docs-1",
"kind": "tsc",
"args": [
"-p",
"${suiteDirectory}/mui-docs-1/docs",
"--outdir",
"${outDirectory}"
],
"platforms": [
"linux"
]
}
9 changes: 9 additions & 0 deletions cases/scenarios/mui-docs-1/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -exo pipefail
cd "${0%/*}"

export SCENARIO_REF=48a29227cb737c6f008a62f9c8c4c47aedd99c43
source ../../cloneScenario.sh https://github.com/mui/material-ui.git

pnpm install --ignore-scripts
11 changes: 1 addition & 10 deletions cases/scenarios/mui-docs/setup.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
#!/usr/bin/env bash

set -exo pipefail

cd "${0%/*}"
SCENARIO_NAME=$(basename $PWD)
SOLUTION_DIR=../../solutions/$SCENARIO_NAME

if ! test -d $SOLUTION_DIR; then
git clone --filter blob:none https://github.com/mui/material-ui.git $SOLUTION_DIR
fi
source ../../cloneScenario.sh https://github.com/mui/material-ui.git

cd $SOLUTION_DIR
git clean -fdx
git reset --hard HEAD
git switch --detach 48a29227cb737c6f008a62f9c8c4c47aedd99c43
pnpm install --ignore-scripts
13 changes: 2 additions & 11 deletions cases/scenarios/self-build-src/setup.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
#!/usr/bin/env bash

set -exo pipefail

cd "${0%/*}"
SCENARIO_NAME=$(basename $PWD)
SOLUTION_DIR=../../solutions/$SCENARIO_NAME

if ! test -d $SOLUTION_DIR; then
git clone --filter blob:none https://github.com/microsoft/TypeScript.git $SOLUTION_DIR
fi
export SCENARIO_REF=$TYPESCRIPT_COMMIT
source ../../cloneScenario.sh https://github.com/microsoft/TypeScript.git

cd $SOLUTION_DIR
git clean -fdx
git reset --hard HEAD
git fetch origin ${TYPESCRIPT_COMMIT}
git switch --detach FETCH_HEAD
npm ci
npx hereby generate-diagnostics
13 changes: 2 additions & 11 deletions cases/scenarios/self-compiler/setup.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
#!/usr/bin/env bash

set -exo pipefail

cd "${0%/*}"
SCENARIO_NAME=$(basename $PWD)
SOLUTION_DIR=../../solutions/$SCENARIO_NAME

if ! test -d $SOLUTION_DIR; then
git clone --filter blob:none https://github.com/microsoft/TypeScript.git $SOLUTION_DIR
fi
export SCENARIO_REF=$TYPESCRIPT_COMMIT
source ../../cloneScenario.sh https://github.com/microsoft/TypeScript.git

cd $SOLUTION_DIR
git clean -fdx
git reset --hard HEAD
git fetch origin ${TYPESCRIPT_COMMIT}
git switch --detach FETCH_HEAD
npm ci
npx hereby generate-diagnostics
13 changes: 13 additions & 0 deletions cases/scenarios/vscode-1/scenario.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "vscode-1",
"kind": "tsc",
"args": [
"-p",
"${suiteDirectory}/vscode-1/src",
"--outdir",
"${outDirectory}"
],
"platforms": [
"linux"
]
}
9 changes: 9 additions & 0 deletions cases/scenarios/vscode-1/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -exo pipefail
cd "${0%/*}"

export SCENARIO_REF=f88bce8fe6a6d2ccd27cbd64bb26853cd8779afa
source ../../cloneScenario.sh https://github.com/microsoft/vscode.git

COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 install --ignore-scripts
11 changes: 1 addition & 10 deletions cases/scenarios/vscode/setup.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
#!/usr/bin/env bash

set -exo pipefail

cd "${0%/*}"
SCENARIO_NAME=$(basename $PWD)
SOLUTION_DIR=../../solutions/$SCENARIO_NAME

if ! test -d $SOLUTION_DIR; then
git clone --filter blob:none https://github.com/microsoft/vscode.git $SOLUTION_DIR
fi
source ../../cloneScenario.sh https://github.com/microsoft/vscode.git

cd $SOLUTION_DIR
git clean -fdx
git reset --hard HEAD
git switch --detach f88bce8fe6a6d2ccd27cbd64bb26853cd8779afa
COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 install --ignore-scripts
13 changes: 13 additions & 0 deletions cases/scenarios/webpack-1/scenario.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "webpack-1",
"kind": "tsc",
"args": [
"-p",
"${suiteDirectory}/webpack-1",
"--outdir",
"${outDirectory}"
],
"platforms": [
"linux"
]
}
14 changes: 14 additions & 0 deletions cases/scenarios/webpack-1/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -exo pipefail
cd "${0%/*}"

export SCENARIO_REF=228fc69f40c3e9ec6d99a5105fdc85b5bca4ce43
source ../../cloneScenario.sh https://github.com/webpack/webpack.git

COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 install --ignore-scripts

# https://github.com/webpack/webpack/blob/228fc69f40c3e9ec6d99a5105fdc85b5bca4ce43/.github/workflows/test.yml#L135
LINK_FOLDER=$PWD/node_modules/.yarn-link
COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 link --link-folder $LINK_FOLDER
COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 link --link-folder $LINK_FOLDER webpack
11 changes: 1 addition & 10 deletions cases/scenarios/webpack/setup.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
#!/usr/bin/env bash

set -exo pipefail

cd "${0%/*}"
SCENARIO_NAME=$(basename $PWD)
SOLUTION_DIR=../../solutions/$SCENARIO_NAME

if ! test -d $SOLUTION_DIR; then
git clone --filter blob:none https://github.com/webpack/webpack.git $SOLUTION_DIR
fi
source ../../cloneScenario.sh https://github.com/webpack/webpack.git

cd $SOLUTION_DIR
git clean -fdx
git reset --hard HEAD
git switch --detach 228fc69f40c3e9ec6d99a5105fdc85b5bca4ce43
COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 install --ignore-scripts

# https://github.com/webpack/webpack/blob/228fc69f40c3e9ec6d99a5105fdc85b5bca4ce43/.github/workflows/test.yml#L135
Expand Down
7 changes: 2 additions & 5 deletions cases/solutions/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
/vscode/
/self-compiler/
/self-build-src/
/mui-docs/
/webpack/
# Ignore all directories; manually add new dirs as unignored if needed.
/*/