From bff14761ac74567edafd58f21ff2e70ab0fe6012 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 2 Sep 2023 16:32:46 +0800 Subject: [PATCH] Use optparse-test in release/build --- .github/scripts/build.sh | 2 ++ .github/scripts/test.sh | 5 ++++- .github/workflows/optparse-test.yaml | 19 ------------------- 3 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/optparse-test.yaml diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh index 51461c2..33fab01 100644 --- a/.github/scripts/build.sh +++ b/.github/scripts/build.sh @@ -27,9 +27,11 @@ build_with_cache --project-file=cabal.project.release -w "${GHC}" --enable-tests mkdir -p out binary=$(cabal --project-file=cabal.project.release list-bin ghcup) binary_test=$(cabal --project-file=cabal.project.release list-bin ghcup-test) +binary_opttest=$(cabal --project-file=cabal.project.release list-bin ghcup-optparse-test) ver=$("${binary}" --numeric-version) strip_binary "${binary}" cp "${binary}" "out/${ARTIFACT}-${ver}${ext}" cp "${binary_test}" "out/test-${ARTIFACT}-${ver}${ext}" +cp "${binary_opttest}" "out/test-optparse-${ARTIFACT}-${ver}${ext}" cp ./dist-newstyle/cache/plan.json "out/${ARTIFACT}.plan.json" diff --git a/.github/scripts/test.sh b/.github/scripts/test.sh index 2befec2..cc7af1c 100644 --- a/.github/scripts/test.sh +++ b/.github/scripts/test.sh @@ -18,8 +18,10 @@ mkdir -p "${GHCUP_BIN}" cp "out/${ARTIFACT}"-* "$GHCUP_BIN/ghcup${ext}" cp "out/test-${ARTIFACT}"-* "ghcup-test${ext}" +cp "out/test-optparse-${ARTIFACT}"-* "ghcup-test-optparse${ext}" chmod +x "$GHCUP_BIN/ghcup${ext}" chmod +x "ghcup-test${ext}" +chmod +x "ghcup-test-optparse${ext}" "$GHCUP_BIN/ghcup${ext}" --version eghcup --version @@ -29,7 +31,8 @@ sha_sum "$(raw_eghcup --offline whereis ghcup)" ### Haskell test suite ./ghcup-test${ext} -rm ghcup-test${ext} +./ghcup-test-optparse${ext} +rm ghcup-test${ext} ghcup-test-optparse${ext} ### manual cli based testing diff --git a/.github/workflows/optparse-test.yaml b/.github/workflows/optparse-test.yaml deleted file mode 100644 index 7320b42..0000000 --- a/.github/workflows/optparse-test.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Optparse Test - -on: - - push - - pull_request - -jobs: - ghcup-optparse-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: haskell/actions/setup@v2 - id: setup-haskell - with: - ghc-version: 9.2.8 - cabal-version: 3.10.1.0 - - run: - cabal test ghcup-optparse-test