Skip to content

[wip]refactor: refactor parser. parse kcl project by separate file #1557

[wip]refactor: refactor parser. parse kcl project by separate file

[wip]refactor: refactor parser. parse kcl project by separate file #1557

name: Build and Test on MacOS ARCH64
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
MACOSX_DEPLOYMENT_TARGET: '11.0'
jobs:
build-and-test:
# Ref: https://github.com/actions/runner-images/tree/main/images/macos
# Note: The arch of macos-13-xlarge and macos-14 is arm64
strategy:
matrix:
os: [macos-13-xlarge, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
submodules: "true"
- run: clang --version
- run: cargo --version
- run: rustc --print sysroot
- name: Delete rust cargo
run: rm -rf /root/.cargo/bin
shell: bash
- name: Install LLVM 12
run: brew install llvm@12
shell: bash
- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79
override: true
components: clippy, rustfmt
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Grammar test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make && make test-grammar
shell: bash
- name: Evaluator Grammar test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make test-grammar-evaluator
shell: bash
- name: Release
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make release
shell: bash
- uses: actions/upload-artifact@v4
if: "contains(matrix.os, 'macos-13-xlarge')"
with:
name: kcl-darwin-arm64
if-no-files-found: error
path: _build/kclvm-Darwin-latest.tar.gz