Skip to content

Update build-ubuntu.yml #454

Update build-ubuntu.yml

Update build-ubuntu.yml #454

Workflow file for this run

name: build-macos
on: push
jobs:
test:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
build: [Debug, Release]
standard: [cxx23]
defaults:
run:
shell: bash
name: "${{matrix.standard}}-${{matrix.build}}"
steps:
- uses: actions/checkout@v2
- name: List Xcode installations
run: sudo ls -1 /Applications | grep "Xcode"
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer
- name: Install Dependency
run: brew install cxxopts fmt llvm@14 ninja spdlog openblas
- name: Checkout
run: |
git submodule update --init --recursive
- name: Install WASI SDK
run: |
cd /opt
sudo wget http://108.181.27.85/wasi/wasi-sdk-20.0-macos.tar.gz
sudo tar -xzf wasi-sdk-*.tar.gz
- name: Make WASI Socket Ext
run: |
cd lib/wasm-micro-runtime/samples/socket-api/
cmake .
make -j
- name: Install AOT wamrc
run: |
cd lib/wasm-micro-runtime/wamr-compiler
mkdir build
cd build
cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_AOT_STACK_FRAME=1 -DWAMR_BUILD_DEBUG_AOT=0 -DWAMR_BUILD_DUMP_CALL_STACK=1 -DWAMR_BUILD_CUSTOM_NAME_SECTION=1 -DWAMR_BUILD_SHARED_MEMORY=1 -DWAMR_BUILD_WITH_CUSTOM_LLVM=1 -DWAMR_BUILD_LOAD_CUSTOM_SECTION=1 -DLLVM_DIR=/usr/local/opt/llvm@14/lib/cmake/llvm/
make -j
- name: configure cmake
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build}} -DLLVM_DIR=/usr/local/opt/llvm@14/lib/cmake/llvm/
- name: build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.build}} && cp MVVM_checkpoint MVVM_checkpoint-macos && cp MVVM_restore MVVM_restore-macos
- uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/') && ${{matrix.build}} == "Release"
with:
name: MVVM_checkpoint-macos
path: ${{runner.workspace}}/build/MVVM_checkpoint-macos
- uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/') && ${{matrix.build}} == "Release"
with:
name: MVVM_restore-macos
path: ${{runner.workspace}}/build/MVVM_restore-macos
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && ${{matrix.build}} == "Release"
with:
files: |
${{runner.workspace}}/build/MVVM_checkpoint-macos
${{runner.workspace}}/build/MVVM_restore-macos
generate_release_notes: true
draft: true