mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Merge pull request #3224 from laytan/macos-self-contained-releases
Make MacOS releases self contained / bundle LLVM
This commit is contained in:
@@ -63,11 +63,13 @@ jobs:
|
|||||||
cp -r core dist
|
cp -r core dist
|
||||||
cp -r vendor dist
|
cp -r vendor dist
|
||||||
cp -r examples dist
|
cp -r examples dist
|
||||||
|
# Zipping so executable permissions are retained, see https://github.com/actions/upload-artifact/issues/38
|
||||||
|
zip -r dist.zip dist
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: ubuntu_artifacts
|
name: ubuntu_artifacts
|
||||||
path: dist
|
path: dist.zip
|
||||||
build_macos:
|
build_macos:
|
||||||
name: MacOS Build
|
name: MacOS Build
|
||||||
if: github.repository == 'odin-lang/Odin'
|
if: github.repository == 'odin-lang/Odin'
|
||||||
@@ -76,15 +78,13 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Download LLVM and setup PATH
|
- name: Download LLVM and setup PATH
|
||||||
run: |
|
run: |
|
||||||
brew install llvm@13
|
brew install llvm@13 dylibbundler
|
||||||
echo "/usr/local/opt/llvm@13/bin" >> $GITHUB_PATH
|
echo "/usr/local/opt/llvm@13/bin" >> $GITHUB_PATH
|
||||||
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
||||||
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
||||||
- name: build odin
|
- name: build odin
|
||||||
run: make nightly
|
run: make nightly
|
||||||
- name: Odin run
|
- name: Bundle
|
||||||
run: ./odin run examples/demo
|
|
||||||
- name: Copy artifacts
|
|
||||||
run: |
|
run: |
|
||||||
mkdir dist
|
mkdir dist
|
||||||
cp odin dist
|
cp odin dist
|
||||||
@@ -94,11 +94,16 @@ jobs:
|
|||||||
cp -r core dist
|
cp -r core dist
|
||||||
cp -r vendor dist
|
cp -r vendor dist
|
||||||
cp -r examples dist
|
cp -r examples dist
|
||||||
|
dylibbundler -b -x dist/odin -d dist/libs -od -p @executable_path/libs
|
||||||
|
# Zipping so executable permissions are retained, see https://github.com/actions/upload-artifact/issues/38
|
||||||
|
zip -r dist.zip dist
|
||||||
|
- name: Odin run
|
||||||
|
run: ./dist/odin run examples/demo
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: macos_artifacts
|
name: macos_artifacts
|
||||||
path: dist
|
path: dist.zip
|
||||||
build_macos_arm:
|
build_macos_arm:
|
||||||
name: MacOS ARM Build
|
name: MacOS ARM Build
|
||||||
if: github.repository == 'odin-lang/Odin'
|
if: github.repository == 'odin-lang/Odin'
|
||||||
@@ -107,15 +112,13 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Download LLVM and setup PATH
|
- name: Download LLVM and setup PATH
|
||||||
run: |
|
run: |
|
||||||
brew install llvm@13
|
brew install llvm@13 dylibbundler
|
||||||
echo "/opt/homebrew/opt/llvm@13/bin" >> $GITHUB_PATH
|
echo "/opt/homebrew/opt/llvm@13/bin" >> $GITHUB_PATH
|
||||||
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
||||||
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
||||||
- name: build odin
|
- name: build odin
|
||||||
run: make nightly
|
run: make nightly
|
||||||
- name: Odin run
|
- name: Bundle
|
||||||
run: ./odin run examples/demo
|
|
||||||
- name: Copy artifacts
|
|
||||||
run: |
|
run: |
|
||||||
mkdir dist
|
mkdir dist
|
||||||
cp odin dist
|
cp odin dist
|
||||||
@@ -125,11 +128,16 @@ jobs:
|
|||||||
cp -r core dist
|
cp -r core dist
|
||||||
cp -r vendor dist
|
cp -r vendor dist
|
||||||
cp -r examples dist
|
cp -r examples dist
|
||||||
|
dylibbundler -b -x dist/odin -d dist/libs -od -p @executable_path/libs
|
||||||
|
# Zipping so executable permissions are retained, see https://github.com/actions/upload-artifact/issues/38
|
||||||
|
zip -r dist.zip dist
|
||||||
|
- name: Odin run
|
||||||
|
run: ./dist/odin run examples/demo
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: macos_arm_artifacts
|
name: macos_arm_artifacts
|
||||||
path: dist
|
path: dist.zip
|
||||||
upload_b2:
|
upload_b2:
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
needs: [build_windows, build_macos, build_macos_arm, build_ubuntu]
|
needs: [build_windows, build_macos, build_macos_arm, build_ubuntu]
|
||||||
|
|||||||
Reference in New Issue
Block a user