Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeByAidan committed Nov 7, 2023
1 parent fe5a9fe commit 6446085
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,10 @@ jobs:
gcc -o ${{ env.BUILD_DIR }}/largeintcalculator largeintcalculator.c
# On Windows, rename the executable to .exe
if [[ "$RUNNER_OS" == "Windows" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator.exe ${{ env.BUILD_DIR }}/windows
mv ${{ env.BUILD_DIR }}/largeintcalculator.exe ${{ env.BUILD_DIR }}/windows/largeintcalculator.exe
elif [[ "$RUNNER_OS" == "Linux" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/ubuntu
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/ubuntu/largeintcalculator
elif [[ "$RUNNER_OS" == "macOS" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/macos
fi
working-directory: ${{ github.workspace }}

- name: Move executable to appropriate directory
run: |
mkdir -p ${{ env.BUILD_DIR }}/windows ${{ env.BUILD_DIR }}/ubuntu ${{ env.BUILD_DIR }}/macos
if [[ "$RUNNER_OS" == "Windows" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator.exe ${{ env.BUILD_DIR }}/windows
elif [[ "$RUNNER_OS" == "Linux" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/ubuntu
elif [[ "$RUNNER_OS" == "macOS" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/macos
fi
run: |
mkdir -p ${{ env.BUILD_DIR }}/windows ${{ env.BUILD_DIR }}/ubuntu ${{ env.BUILD_DIR }}/macos
if [[ "$RUNNER_OS" == "Windows" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator.exe ${{ env.BUILD_DIR }}/windows
elif [[ "$RUNNER_OS" == "Linux" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/ubuntu
elif [[ "$RUNNER_OS" == "macOS" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/macos
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/macos/largeintcalculator
fi
working-directory: ${{ github.workspace }}

0 comments on commit 6446085

Please sign in to comment.