Skip to content

Commit

Permalink
[ ci ] Merge branching on OS
Browse files Browse the repository at this point in the history
  • Loading branch information
banacorn committed Nov 22, 2024
1 parent 95e9c4f commit eb7e995
Showing 1 changed file with 7 additions and 31 deletions.
38 changes: 7 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,7 @@ jobs:
- name: 🔍 Check if Agda has been installed
id: check-agda
continue-on-error: true
run: |
echo $PATH
if [[ ${{ runner.os }} == "Windows" ]]; then
$DIST/bin/agda.exe -V
which agda.exe
else
$DIST/bin/agda -V
which agda
fi
run: which agda

- name: 📦 Setup ${{ env.DIST }}
if: ${{ steps.check-agda.outcome == 'failure'}}
Expand All @@ -124,35 +115,20 @@ jobs:
stack install --resolver=lts-20.26 ${{ matrix.agda }}
- name: 📦 Move artefacts to ${{ env.DIST }}
continue-on-error: true
run: |
# Copy the binary:
cp $STACK_LOCAL_BIN/agda $DIST/bin
strip $DIST/bin/agda
file $DIST/bin/agda
if [[ ${{ runner.os }} == "Windows" ]]; then
# Copy the binary:
cp $STACK_LOCAL_BIN/agda.exe $DIST/bin
strip $DIST/bin/agda.exe
file $DIST/bin/agda.exe
# Copy the rest of the artefacts:
cp -a $($STACK_LOCAL_BIN/agda --print-agda-dir)/. $DIST
# Copy the rest of the artefacts:
cp -a $($STACK_LOCAL_BIN/agda.exe --print-agda-dir)/. $DIST
ls $DIST/bin
else
# Copy the binary:
cp $STACK_LOCAL_BIN/agda $DIST/bin
strip $DIST/bin/agda
file $DIST/bin/agda
# Copy the rest of the artefacts:
cp -a $($STACK_LOCAL_BIN/agda --print-agda-dir)/. $DIST
fi
# Setting the $Agda_datadir environment variable as $DIST
echo "Agda_datadir=$(pwd)/$DIST" >> "$GITHUB_ENV"
- name: 🔍 Check if Agda has been installed again
continue-on-error: true
run: |
echo "Agda_datadir = $Agda_datadir"
which agda
Expand Down

0 comments on commit eb7e995

Please sign in to comment.