Skip to content

Commit

Permalink
Build MetaCall with Cobol Support for macOS (#439)
Browse files Browse the repository at this point in the history
* Enable Cobol [skip ci]

* SSH intro runner [skip ci]

* Fix cobol paths [skip ci]

* Fix cobol paths [skip ci]
  • Loading branch information
ahmedihabb2 authored Jun 8, 2023
1 parent a2804eb commit b4a590f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/macos-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ jobs:
- name: Set up the environment
run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS
env:
METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file #netcore5 c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage
METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage

- name: Configure
run: |
cd build
bash ../tools/metacall-configure.sh $METACALL_CONFIGURE_OPTIONS
env:
METACALL_CONFIGURE_OPTIONS: ${{ matrix.buildtype }} scripts ports tests sanitizer python nodejs typescript java ruby wasm rpc file # netcore5 c cobol rust examples install pack benchmarks # v8 coverage
METACALL_CONFIGURE_OPTIONS: ${{ matrix.buildtype }} scripts ports tests sanitizer python nodejs typescript java ruby wasm rpc file cobol # netcore5 c rust examples install pack benchmarks # v8 coverage

- name: Build
working-directory: ./build
Expand Down
8 changes: 8 additions & 0 deletions tools/metacall-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,14 @@ sub_cobol(){
# Runtime deps
$SUDO_CMD apk add --no-cache db ncurses
fi
elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then
brew install gnu-cobol
mkdir -p build
CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt"
COBOL_PREFIX=$(brew --prefix gnu-cobol)
echo "-DCOBOL_EXECUTABLE=${COBOL_PREFIX}/bin/cobc" >> $CMAKE_CONFIG_PATH
echo "-DCOBOL_INCLUDE_DIR=${COBOL_PREFIX}/include" >> $CMAKE_CONFIG_PATH
echo "-DCOBOL_LIBRARY=${COBOL_PREFIX}/lib/libcob.dylib" >> $CMAKE_CONFIG_PATH
fi
}

Expand Down

0 comments on commit b4a590f

Please sign in to comment.