Skip to content

Commit c3533ec

Browse files
committed
Fix(mac): Common environment variables
1 parent 4bea147 commit c3533ec

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
permissions:
88
contents: read
99

10+
env:
11+
NATIVE_LIB_LOCATION: /tmp/native-libs/
12+
SBT_OPTS: "-Dsbt.ci=true"
13+
JAVA_OPTS: "-XX:+UseG1GC -Xms2G -Xmx8G -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8"
14+
1015
jobs:
1116
check-formatting:
1217
runs-on: ubuntu-latest
@@ -44,10 +49,7 @@ jobs:
4449
name: ${{ matrix.arch }} build
4550
runs-on: ${{ matrix.os }}
4651
env:
47-
JAVA_OPTS: "-XX:+UseG1GC"
48-
SBT_OPTS: "-Dsbt.ci=true"
4952
TARGET_TRIPLE: ${{ matrix.arch }}
50-
NATIVE_LIB_LOCATION: /tmp/native-libs/
5153
needs: [ check-formatting ]
5254
strategy:
5355
fail-fast: true
@@ -106,7 +108,7 @@ jobs:
106108
uses: actions/upload-artifact@v4
107109
with:
108110
name: native_libs-${{ matrix.arch }}
109-
path: /tmp/native-libs/
111+
path: ${{env.NATIVE_LIB_LOCATION}}
110112
retention-days: 1
111113
if-no-files-found: error
112114

@@ -115,9 +117,6 @@ jobs:
115117
runs-on: ${{ matrix.os }}
116118
needs: [ build-natives ]
117119
env:
118-
JAVA_OPTS: -XX:+UseG1GC -Xms2G -Xmx8G -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
119-
SBT_OPTS: "-Dsbt.ci=true"
120-
NATIVE_LIB_LOCATION: /tmp/native-libs/
121120
SKIP_NATIVE_GENERATION: true
122121
strategy:
123122
fail-fast: false
@@ -139,7 +138,7 @@ jobs:
139138
uses: actions/download-artifact@v4
140139
with:
141140
pattern: native_libs-*
142-
path: /tmp/native-libs/
141+
path: ${{env.NATIVE_LIB_LOCATION}}
143142
merge-multiple: true
144143

145144
- name: Test for ${{ matrix.os }} ${{ matrix.java }}
@@ -161,7 +160,6 @@ jobs:
161160
runs-on: ubuntu-latest
162161
env:
163162
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
164-
NATIVE_LIB_LOCATION: /tmp/native-libs/
165163
SKIP_NATIVE_GENERATION: true
166164
needs: [ test-build ]
167165
steps:
@@ -183,12 +181,12 @@ jobs:
183181
uses: actions/download-artifact@v4
184182
with:
185183
pattern: native_libs-*
186-
path: /tmp/native-libs/
184+
path: ${{env.NATIVE_LIB_LOCATION}}
187185
merge-multiple: true
188186

189187
- name: List the built artifacts
190188
run: ls -lhtR
191-
working-directory: /tmp/native-libs/
189+
working-directory: ${{env.NATIVE_LIB_LOCATION}}
192190

193191
- name: Publish Artifacts
194192
run: sbt +aetherDeploy

0 commit comments

Comments
 (0)