Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kleidukos committed Sep 3, 2024
1 parent 83583dc commit 9f69231
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,24 @@ jobs:
- name: Post-process executables
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
for executable in distribution/*; do
strip "${executable}"
upx -9 "${executable}"
done
strip distribution/get-tested
upx -9 distribution/get-tested
- name: Package the get-tested executable
run: |
GETTESTED_EXEC=distribution/get-tested
archive="get-tested-head-${{ matrix.os }}-${{ env.ARCH }}-ghc-${{ matrix.ghc }}.tar.gz"
ARTIFACT_NAME="get-tested-head-${{ matrix.os }}-static-${{ env.ARCH }}-${{ matrix.ghc }}"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
archive=${ARTIFACT_NAME}.tar.gz
DIR=$(dirname $GETTESTED_EXEC)
FILE=$(basename $GETTESTED_EXEC)
GETTESTED_EXEC_TAR=${archive}
tar -czvf $GETTESTED_EXEC_TAR -C $DIR $FILE
echo "ARTIFACT_NAME=artifact-${{ matrix.os }}-ghc-${{ matrix.ghc }}" >> $GITHUB_ENV
tar -czvf ${archive} -C $DIR $FILE
- name: Upload the get-tested executable
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.GETTESTED_EXEC_TAR }}
path: ${{ env.ARTIFACT_NAME }}.tar.gz

build-alpine:
name: 9.10.1 on alpine-3.20
Expand Down Expand Up @@ -168,28 +166,25 @@ jobs:
run: file distribution/get-tested

- name: Post-process executables
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
for executable in distribution/*; do
strip "${executable}"
upx -9 "${executable}"
done
strip distribution/get-tested
upx -9 distribution/get-tested
- name: Tar get-tested executable
run: |
GETTESTED_EXEC=distribution/get-tested
ARTIFACT_NAME="get-tested-head-alpine-3.20-static-${{ env.ARCH }}-ghc-9.10.1"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
archive=${ARTIFACT_NAME}.tar.gz
DIR=$(dirname $GETTESTED_EXEC)
FILE=$(basename $GETTESTED_EXEC)
GETTESTED_EXEC_TAR=get-tested-head-${{ runner.os }}-static-${{ env.ARCH }}.tar.gz
tar -czvf $GETTESTED_EXEC_TAR -C $DIR $FILE
echo GETTESTED_EXEC_TAR=$GETTESTED_EXEC_TAR >> $GITHUB_ENV
echo "ARTIFACT_NAME=artifact-alpine-3.20-ghc-${{ matrix.ghc }}" >> $GITHUB_ENV
- name: Upload get-tested executable to workflow artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.GETTESTED_EXEC_TAR }}
path: ${{ env.ARTIFACT_NAME }}.tar.gz

collect-test-results:
name: Collect test results
Expand Down

0 comments on commit 9f69231

Please sign in to comment.