Commit 0a536417 by Baruch Sterin

Build CMake on GitHub Actions

Also, resolve CMake build problems on macOS:
Pass CMAKE_OSX_SYSROOT as an environment variable SDKROOT when buildind the arch_flags executable.
parent 2ccb0f78
...@@ -11,7 +11,7 @@ jobs: ...@@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
MAKE_ARGS: ${{ matrix.use_namespace && '-DABC_USE_NAMESPACE=ON' || '' }} CMAKE_ARGS: ${{ matrix.use_namespace && '-DABC_USE_NAMESPACE=xxx' || '' }}
DEMO_ARGS: ${{ matrix.use_namespace && '-DABC_NAMESPACE=xxx' || '' }} DEMO_ARGS: ${{ matrix.use_namespace && '-DABC_NAMESPACE=xxx' || '' }}
DEMO_GCC: ${{ matrix.use_namespace && 'g++ -x c++' || 'gcc' }} DEMO_GCC: ${{ matrix.use_namespace && 'g++ -x c++' || 'gcc' }}
...@@ -34,7 +34,7 @@ jobs: ...@@ -34,7 +34,7 @@ jobs:
- name: Configure CMake - name: Configure CMake
run: | run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${CMAKE_ARGS} -B build
- name: Build CMake - name: Build CMake
run: | run: |
...@@ -53,7 +53,7 @@ jobs: ...@@ -53,7 +53,7 @@ jobs:
- name: Stage Executable - name: Stage Executable
run: | run: |
mkdir staging mkdir staging
cp abc libabc.a staging/ cp build/abc build/libabc.a staging/
- name: Upload pacakge artifact - name: Upload pacakge artifact
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
......
...@@ -47,9 +47,14 @@ if(ABC_USE_NAMESPACE) ...@@ -47,9 +47,14 @@ if(ABC_USE_NAMESPACE)
set(ABC_USE_NAMESPACE_FLAGS "ABC_USE_NAMESPACE=${ABC_USE_NAMESPACE}") set(ABC_USE_NAMESPACE_FLAGS "ABC_USE_NAMESPACE=${ABC_USE_NAMESPACE}")
endif() endif()
if( APPLE )
set(make_env ${CMAKE_COMMAND} -E env SDKROOT=${CMAKE_OSX_SYSROOT})
endif()
# run make to extract compiler options, linker options and list of source files # run make to extract compiler options, linker options and list of source files
execute_process( execute_process(
COMMAND COMMAND
${make_env}
make make
${ABC_READLINE_FLAGS} ${ABC_READLINE_FLAGS}
${ABC_USE_NAMESPACE_FLAGS} ${ABC_USE_NAMESPACE_FLAGS}
......
[![.github/workflows/build-posix.yml](https://github.com/sterin/abc/actions/workflows/build-posix.yml/badge.svg)](https://github.com/sterin/abc/actions/workflows/build-posix.yml) [![.github/workflows/build-posix.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-posix.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-posix.yml)
[![.github/workflows/build-windows.yml](https://github.com/sterin/abc/actions/workflows/build-windows.yml/badge.svg)](https://github.com/sterin/abc/actions/workflows/build-windows.yml) [![.github/workflows/build-windows.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-windows.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-windows.yml)
[![.github/workflows/build-posix-cmake.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-posix-cmake.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-posix-cmake.yml)
# ABC: System for Sequential Logic Synthesis and Formal Verification # ABC: System for Sequential Logic Synthesis and Formal Verification
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment