Skip to content

Commit

Permalink
feat: improve mac ci (#28)
Browse files Browse the repository at this point in the history
* feat: only lock llvm and rust version for debug

* fix: path setting

* fix: llvm18

* feat: remove mac-x64-debug to save action concurrency

---------

Co-authored-by: Hu Yueh-Wei <[email protected]>
  • Loading branch information
wangyoucao577 and halajohn authored Sep 19, 2024
1 parent fa54a51 commit e24c288
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,29 @@ jobs:

- name: Install tools and dependencies
run: |
brew install llvm@18
if [ ${{ matrix.build_type }} == "debug" ]; then
# Since the TEN runtime and TEN manager are a combination of C and
# Rust, to enable ASan, the ASan versions used by both the C and
# Rust compilation environments must be consistent. Therefore, it is
# necessary to lock the LLVM and Rust versions to enable ASan.
brew install llvm@18
rustup default nightly-2024-07-19
else
rustup default nightly
fi
brew install tree
pip3 install --use-pep517 python-dotenv jinja2
go install golang.org/dl/go1.20.12@latest && go1.20.12 download
go env -w GOFLAGS="-buildvcs=false"
rustup default nightly-2024-07-19
cargo install --force cbindgen
- name: Build
run: |
export PATH="/opt/homebrew/opt/llvm@18/bin:$PATH"
if [ ${{ matrix.build_type }} == "debug" ]; then
export PATH="/opt/homebrew/opt/llvm@18/bin:$PATH"
fi
export PATH=$(pwd)/core/ten_gn:$PATH
echo $PATH
tgn gen mac arm64 ${{ matrix.build_type }} -- log_level=1 enable_serialized_actions=true ten_enable_test=false
Expand All @@ -60,7 +72,7 @@ jobs:
runs-on: macos-13
strategy:
matrix:
build_type: [debug, release]
build_type: [release]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -78,17 +90,29 @@ jobs:

- name: Install tools and dependencies
run: |
brew install llvm@18
if [ ${{ matrix.build_type }} == "debug" ]; then
# Since the TEN runtime and TEN manager are a combination of C and
# Rust, to enable ASan, the ASan versions used by both the C and
# Rust compilation environments must be consistent. Therefore, it is
# necessary to lock the LLVM and Rust versions to enable ASan.
brew install llvm@18
rustup default nightly-2024-07-19
else
rustup default nightly
fi
brew install tree
pip3 install --use-pep517 python-dotenv jinja2
go install golang.org/dl/go1.20.12@latest && go1.20.12 download
go env -w GOFLAGS="-buildvcs=false"
rustup default nightly-2024-07-19
cargo install --force cbindgen
- name: Build
run: |
export PATH="/usr/local/opt/llvm@18/bin:$PATH"
if [ ${{ matrix.build_type }} == "debug" ]; then
export PATH="/usr/local/opt/llvm@18/bin:$PATH"
fi
export PATH=$(pwd)/core/ten_gn:$PATH
echo $PATH
tgn gen mac x64 ${{ matrix.build_type }} -- log_level=1 enable_serialized_actions=true ten_enable_test=false
Expand Down

0 comments on commit e24c288

Please sign in to comment.