Skip to content

Commit

Permalink
Really fix the Windows CI build
Browse files Browse the repository at this point in the history
This works around a weird problem with make + bash, where there is some
sort of mismatch between the MinGW programs and the built-in Windows
ones. It may happen because Jaunch's Makefile targets call shell scripts
that require bash, and somehow the wrong bash is chosen, which triggers
a Windows error about how WSL needs to be installed.

I'm mostly just speculating. But whatever is actually going on, in this
case, using a shebang of `#!/usr/bin/env bash` avoids the issue.

See also actions/runner-images#7253.
  • Loading branch information
ctrueden committed Feb 2, 2024
1 parent 9d2e3d6 commit 4aa833c
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 12 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ jobs:
java-version: '21'
cache: 'gradle'

- name: Enable MinGW
if: runner.os == 'Windows'
# https://stackoverflow.com/a/77298592/1207769
run: |
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
- name: Build
run: make compile-all

Expand Down
2 changes: 1 addition & 1 deletion bin/app.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
echo
Expand Down
2 changes: 1 addition & 1 deletion bin/clean.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
echo
Expand Down
2 changes: 1 addition & 1 deletion bin/compile-configurator.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
echo
Expand Down
2 changes: 1 addition & 1 deletion bin/compile-launcher.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
echo
Expand Down
2 changes: 1 addition & 1 deletion bin/help.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
echo "Available targets:
clean - remove build files and directories
compile-launcher - compile the native launcher (C)
Expand Down
2 changes: 1 addition & 1 deletion bin/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
echo
Expand Down

0 comments on commit 4aa833c

Please sign in to comment.