Use optparse-test in release/build
This commit is contained in:
parent
99ddcc938f
commit
bff14761ac
2
.github/scripts/build.sh
vendored
2
.github/scripts/build.sh
vendored
@ -27,9 +27,11 @@ build_with_cache --project-file=cabal.project.release -w "${GHC}" --enable-tests
|
|||||||
mkdir -p out
|
mkdir -p out
|
||||||
binary=$(cabal --project-file=cabal.project.release list-bin ghcup)
|
binary=$(cabal --project-file=cabal.project.release list-bin ghcup)
|
||||||
binary_test=$(cabal --project-file=cabal.project.release list-bin ghcup-test)
|
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)
|
ver=$("${binary}" --numeric-version)
|
||||||
strip_binary "${binary}"
|
strip_binary "${binary}"
|
||||||
cp "${binary}" "out/${ARTIFACT}-${ver}${ext}"
|
cp "${binary}" "out/${ARTIFACT}-${ver}${ext}"
|
||||||
cp "${binary_test}" "out/test-${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"
|
cp ./dist-newstyle/cache/plan.json "out/${ARTIFACT}.plan.json"
|
||||||
|
|
||||||
|
5
.github/scripts/test.sh
vendored
5
.github/scripts/test.sh
vendored
@ -18,8 +18,10 @@ mkdir -p "${GHCUP_BIN}"
|
|||||||
|
|
||||||
cp "out/${ARTIFACT}"-* "$GHCUP_BIN/ghcup${ext}"
|
cp "out/${ARTIFACT}"-* "$GHCUP_BIN/ghcup${ext}"
|
||||||
cp "out/test-${ARTIFACT}"-* "ghcup-test${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_BIN/ghcup${ext}"
|
||||||
chmod +x "ghcup-test${ext}"
|
chmod +x "ghcup-test${ext}"
|
||||||
|
chmod +x "ghcup-test-optparse${ext}"
|
||||||
|
|
||||||
"$GHCUP_BIN/ghcup${ext}" --version
|
"$GHCUP_BIN/ghcup${ext}" --version
|
||||||
eghcup --version
|
eghcup --version
|
||||||
@ -29,7 +31,8 @@ sha_sum "$(raw_eghcup --offline whereis ghcup)"
|
|||||||
### Haskell test suite
|
### Haskell test suite
|
||||||
|
|
||||||
./ghcup-test${ext}
|
./ghcup-test${ext}
|
||||||
rm ghcup-test${ext}
|
./ghcup-test-optparse${ext}
|
||||||
|
rm ghcup-test${ext} ghcup-test-optparse${ext}
|
||||||
|
|
||||||
### manual cli based testing
|
### manual cli based testing
|
||||||
|
|
||||||
|
19
.github/workflows/optparse-test.yaml
vendored
19
.github/workflows/optparse-test.yaml
vendored
@ -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
|
|
Loading…
Reference in New Issue
Block a user