Skip to content

Commit 87c6587

Browse files
committed
update build file
1 parent ef4a0d9 commit 87c6587

File tree

1 file changed

+32
-17
lines changed

1 file changed

+32
-17
lines changed

.github/workflows/build.yml

+32-17
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
workflow_dispatch:
1616
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
1717

18+
defaults:
19+
run:
20+
shell: bash
21+
1822
env:
1923
# https://docs.brew.sh/Manpage#environment
2024
HOMEBREW_NO_ANALYTICS: 1
@@ -39,13 +43,13 @@ jobs:
3943

4044
steps:
4145
- name: Show environment variables
42-
shell: bash
4346
run: env | sort
4447

4548
- name: Git Checkout
4649
uses: actions/checkout@v3 #https://github.com/actions/checkout
4750

4851
- name: "Cache: Haxelib Repository"
52+
if: ${{ !env.ACT }}
4953
uses: actions/cache@v3
5054
with:
5155
path: ${{ runner.tool_cache }}/haxe/${{ matrix.haxe }}/x64/lib
@@ -54,14 +58,17 @@ jobs:
5458
restore-keys: |
5559
${{ runner.os }}-haxelib-${{ matrix.haxe }}-
5660
57-
- name: Update brew formulas
61+
- name: "MacOS: Update brew formulas"
5862
if: runner.os == 'macOS'
5963
run: |
64+
set -eu
65+
6066
echo "::group::brew update" && brew update && echo "::endgroup::"
6167
echo "::group::brew config" && brew config && echo "::endgroup::"
6268
echo "::group::brew list" && brew list --version && echo "::endgroup::"
6369
6470
# workaround to prevent "Error: The `brew link` step did not complete successfully" during "brew install mono"
71+
# and setup-python action, see https://github.com/actions/setup-python/issues/577
6572
rm -f \
6673
/usr/local/share/man/man1/* \
6774
/usr/local/share/man/man5/* \
@@ -72,20 +79,6 @@ jobs:
7279
/usr/local/bin/python3 \
7380
/usr/local/bin/python3-config
7481
75-
- name: "Install: Python 3"
76-
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
77-
with:
78-
python-version: "3.10"
79-
80-
- name: Configure Python 3 on Windows
81-
if: runner.os == 'Windows'
82-
shell: cmd
83-
# workaround for https://github.com/actions/setup-python/issues/123
84-
run:
85-
if not exist "%pythonLocation%\python.exe" (
86-
mklink "%pythonLocation%\python3.exe" "%pythonLocation%\python.exe"
87-
)
88-
8982
- name: "Install Hashlink"
9083
if: runner.os == 'Linux'
9184
run: |
@@ -102,14 +95,35 @@ jobs:
10295
echo "/opt/hashlink" >> $GITHUB_PATH
10396
fi
10497
98+
- name: "Install: Java 11"
99+
uses: actions/setup-java@v3
100+
with:
101+
distribution: 'temurin'
102+
java-version: 11
103+
104+
- name: "Install: Python 3"
105+
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
106+
with:
107+
python-version: "3.10"
108+
109+
- name: Configure Python 3 on Windows
110+
if: runner.os == 'Windows'
111+
shell: cmd
112+
# workaround for https://github.com/actions/setup-python/issues/123
113+
run:
114+
if not exist "%pythonLocation%\python.exe" (
115+
mklink "%pythonLocation%\python3.exe" "%pythonLocation%\python.exe"
116+
)
117+
105118
- name: "Install: Haxe ${{ matrix.haxe }}"
106119
uses: krdlab/setup-haxe@v1 # https://github.com/krdlab/setup-haxe
107120
with:
108121
haxe-version: ${{ matrix.haxe }}
109122

110123
- name: "Install: Haxe Libraries"
111-
shell: bash
112124
run: |
125+
set -eu
126+
113127
haxelib config
114128
115129
for lib in hx3compat hscript munit tink_testrunner utest; do
@@ -188,6 +202,7 @@ jobs:
188202

189203
steps:
190204
- name: "Delete intermediate build artifacts"
205+
if: ${{ !env.ACT }}
191206
uses: geekyeggo/delete-artifact@v2 # https://github.com/GeekyEggo/delete-artifact/
192207
with:
193208
name: "*"

0 commit comments

Comments
 (0)