Created
July 7, 2021 07:23
-
-
Save mpickering/fcbbb46f68fbef45c92196b99ea14a6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -r ci/run | |
DIR=$(pwd) | |
MYTMPDIR="$(mktemp -d)" | |
trap 'cd $DIR && rm -rf -- "$MYTMPDIR"' EXIT | |
URL="https://gitlab.haskell.org/ghc/ghc/-/pipelines/37559.json" | |
URL="https://gitlab.haskell.org/ghc/ghc/-/pipelines/37608.json" | |
BASE_URL="https://gitlab.haskell.org" | |
function jsonify(){ | |
echo "${BASE_URL}$1.json" | |
} | |
HH=$(curl $URL | jq -r '.details.stages | .[] | .groups | .[] | select(.name | contains("nightly-hackage")) | .status.details_path') | |
echo $HH | |
echo "$(jsonify $HH)" | |
HH_JOB=$(curl "$(jsonify $HH)" | jq -r '.details .stages | .[] | .groups | .[] | select(.name | contains("build-pipeline")) | .status .details_path') | |
echo $HH_JOB | |
echo "$(jsonify $HH_JOB)" | |
HH_ARTIFACT_PATH=$(curl $(jsonify $HH_JOB) | jq -r '.artifact .download_path') | |
cd $MYTMPDIR | |
curl -L "$BASE_URL$HH_ARTIFACT_PATH" --output $MYTMPDIR/results.zip | |
nix run nixpkgs.unzip -c unzip $MYTMPDIR/results.zip | |
tar -xf $MYTMPDIR/results.tar.xz | |
export ONLY_PACKAGES=$(cat results.json | jq -r '[.testedPatches | .[] .patchedPackageResult.units | .[] | select(.[1] | .tag == "BuildFailed" ) | .[0] | .pkgName ] | unique | .[] ') | |
cd $DIR | |
echo $ONLY_PACKAGES | |
unset ONLY_PACKAGES | |
export ONLY_PACKAGES="tasty" | |
FED_JOB=$(curl $URL | jq -r '.details.stages | .[] | .groups | .[] | select(.name | contains("fedora")) | .status.details_path') | |
URL="/artifacts/raw/ghc-x86_64-fedora27-linux.tar.xz" | |
nix run -f ./ci -c curl -L "${BASE_URL}${FED_JOB}${URL}" > $MYTMPDIR/ghc.tar.xz | |
echo "${BASE_URL}${FED_JOB}$URL" | |
ls $MYTMPDIR | |
nix build -f ci/ghc-from-artifact.nix \ | |
--arg ghcTarball $MYTMPDIR/ghc.tar.xz \ | |
-o ghc-head | |
ls ghc-head | |
export GHC=$DIR/ghc-head/bin/ghc | |
nix build -f https://gitlab.haskell.org/bgamari/ghcs-nix/-/archive/master/ghcs-nix-master.tar.gz \ | |
-o ghc-9_0 \ | |
ghc-9_0_1 | |
nix build -f https://gitlab.haskell.org/bgamari/ghcs-nix/-/archive/master/ghcs-nix-master.tar.gz \ | |
-o ghc-9_2 \ | |
ghc-9_2_1-alpha1 | |
ghc-9_0/bin/ghc --version | |
ghc-9_2/bin/ghc --version | |
ghc --version | |
$GHC --version | |
CMD="nix run -f ./ci -c run-ci --cabal-option=--disable-optimisation" | |
$CMD | |
echo "GHC=$GHC ONLY_PACKAGES=$ONLY_PACKAGES $CMD" | |
./scripts/patch-tool unpack-patch-all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment