mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
add MacOS ARM target to CI and releases
This commit is contained in:
@@ -46,6 +46,9 @@ jobs:
|
|||||||
- name: Odin check examples/all for Linux i386
|
- name: Odin check examples/all for Linux i386
|
||||||
run: ./odin check examples/all -vet -strict-style -target:linux_i386
|
run: ./odin check examples/all -vet -strict-style -target:linux_i386
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
- name: Odin check examples/all for Linux arm64
|
||||||
|
run: ./odin check examples/all -vet -strict-style -target:linux_arm64
|
||||||
|
timeout-minutes: 10
|
||||||
- name: Odin check examples/all for FreeBSD amd64
|
- name: Odin check examples/all for FreeBSD amd64
|
||||||
run: ./odin check examples/all -vet -strict-style -target:freebsd_amd64
|
run: ./odin check examples/all -vet -strict-style -target:freebsd_amd64
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
@@ -92,11 +95,45 @@ jobs:
|
|||||||
cd tests/internal
|
cd tests/internal
|
||||||
make
|
make
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
- name: Odin check examples/all for Darwin arm64
|
build_macOS_arm:
|
||||||
run: ./odin check examples/all -vet -strict-style -target:darwin_arm64
|
runs-on: macos-14 # This is an arm/m1 runner.
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Download LLVM, botan and setup PATH
|
||||||
|
run: |
|
||||||
|
brew install llvm@13 botan
|
||||||
|
echo "/opt/homebrew/opt/llvm@13/bin" >> $GITHUB_PATH
|
||||||
|
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
||||||
|
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
||||||
|
- name: build odin
|
||||||
|
run: ./build_odin.sh release
|
||||||
|
- name: Odin version
|
||||||
|
run: ./odin version
|
||||||
|
timeout-minutes: 1
|
||||||
|
- name: Odin report
|
||||||
|
run: ./odin report
|
||||||
|
timeout-minutes: 1
|
||||||
|
- name: Odin check
|
||||||
|
run: ./odin check examples/demo -vet
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
- name: Odin check examples/all for Linux arm64
|
- name: Odin run
|
||||||
run: ./odin check examples/all -vet -strict-style -target:linux_arm64
|
run: ./odin run examples/demo
|
||||||
|
timeout-minutes: 10
|
||||||
|
- name: Odin run -debug
|
||||||
|
run: ./odin run examples/demo -debug
|
||||||
|
timeout-minutes: 10
|
||||||
|
- name: Odin check examples/all
|
||||||
|
run: ./odin check examples/all -strict-style
|
||||||
|
timeout-minutes: 10
|
||||||
|
- name: Core library tests
|
||||||
|
run: |
|
||||||
|
cd tests/core
|
||||||
|
make
|
||||||
|
timeout-minutes: 10
|
||||||
|
- name: Odin internals tests
|
||||||
|
run: |
|
||||||
|
cd tests/internal
|
||||||
|
make
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
build_windows:
|
build_windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
path: dist
|
path: dist
|
||||||
build_macos:
|
build_macos:
|
||||||
if: github.repository == 'odin-lang/Odin'
|
if: github.repository == 'odin-lang/Odin'
|
||||||
runs-on: macOS-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Download LLVM and setup PATH
|
- name: Download LLVM and setup PATH
|
||||||
@@ -96,9 +96,39 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: macos_artifacts
|
name: macos_artifacts
|
||||||
path: dist
|
path: dist
|
||||||
|
build_macos_arm:
|
||||||
|
if: github.repository == 'odin-lang/Odin'
|
||||||
|
runs-on: macos-14
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Download LLVM and setup PATH
|
||||||
|
run: |
|
||||||
|
brew install llvm@13
|
||||||
|
echo "/opt/homebrew/opt/llvm@13/bin" >> $GITHUB_PATH
|
||||||
|
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
||||||
|
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
||||||
|
- name: build odin
|
||||||
|
run: make nightly
|
||||||
|
- name: Odin run
|
||||||
|
run: ./odin run examples/demo
|
||||||
|
- name: Copy artifacts
|
||||||
|
run: |
|
||||||
|
mkdir dist
|
||||||
|
cp odin dist
|
||||||
|
cp LICENSE dist
|
||||||
|
cp -r shared dist
|
||||||
|
cp -r base dist
|
||||||
|
cp -r core dist
|
||||||
|
cp -r vendor dist
|
||||||
|
cp -r examples dist
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: macos_arm_artifacts
|
||||||
|
path: dist
|
||||||
upload_b2:
|
upload_b2:
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
needs: [build_windows, build_macos, build_ubuntu]
|
needs: [build_windows, build_macos, build_macos_arm, build_ubuntu]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
@@ -129,6 +159,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: macos_artifacts
|
name: macos_artifacts
|
||||||
|
|
||||||
|
- name: Download macOS arm artifacts
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: macos_arm_artifacts
|
||||||
|
|
||||||
- name: Create archives and upload
|
- name: Create archives and upload
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
@@ -145,6 +180,7 @@ jobs:
|
|||||||
./ci/upload_create_nightly.sh "$BUCKET" windows-amd64 windows_artifacts/
|
./ci/upload_create_nightly.sh "$BUCKET" windows-amd64 windows_artifacts/
|
||||||
./ci/upload_create_nightly.sh "$BUCKET" ubuntu-amd64 ubuntu_artifacts/
|
./ci/upload_create_nightly.sh "$BUCKET" ubuntu-amd64 ubuntu_artifacts/
|
||||||
./ci/upload_create_nightly.sh "$BUCKET" macos-amd64 macos_artifacts/
|
./ci/upload_create_nightly.sh "$BUCKET" macos-amd64 macos_artifacts/
|
||||||
|
./ci/upload_create_nightly.sh "$BUCKET" macos-arm64 macos_arm_artifacts/
|
||||||
|
|
||||||
echo Deleting old artifacts in B2
|
echo Deleting old artifacts in B2
|
||||||
python3 ci/delete_old_binaries.py "$BUCKET" "$DAYS_TO_KEEP"
|
python3 ci/delete_old_binaries.py "$BUCKET" "$DAYS_TO_KEEP"
|
||||||
|
|||||||
Reference in New Issue
Block a user