Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some improvements to macOS CI #446

Merged
merged 30 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fe50ed5
SSH intro runner [skip ci]
ahmedihabb2 Jun 8, 2023
0998166
Fix cobol paths [skip ci]
ahmedihabb2 Jun 8, 2023
11747f2
SSH to try commands [skip ci]
ahmedihabb2 Jun 8, 2023
7bba52e
Enable C [skip ci]
ahmedihabb2 Jun 8, 2023
bd2c2bc
Debugging [skip ci]
ahmedihabb2 Jun 8, 2023
d6825a2
Fix tcc paths [skip ci]
ahmedihabb2 Jun 8, 2023
0263c05
Fix typo
ahmedihabb2 Jun 8, 2023
e07deb3
more debugging [skip ci]
ahmedihabb2 Jun 8, 2023
d222b28
Add libclang paths [skip ci]
ahmedihabb2 Jun 8, 2023
84b05ff
Remove Tcc installation [skip ci]
ahmedihabb2 Jun 15, 2023
7da6cf9
fix Tcc installation [skip ci]
ahmedihabb2 Jun 15, 2023
6e571c6
Avoid assuming bash in python [skip ci]
ahmedihabb2 Jun 16, 2023
bf8f501
Avoid assuming bash in ruby [skip ci]
ahmedihabb2 Jun 16, 2023
8f034d8
Avoid assuming bash in ruby [skip ci]
ahmedihabb2 Jun 16, 2023
bae93e8
SSH [skip ci]
ahmedihabb2 Jun 16, 2023
80143b4
Fix java path [skip ci]
ahmedihabb2 Jun 16, 2023
715d46e
Fix java path [skip ci]
ahmedihabb2 Jun 17, 2023
0b54d2b
Fix java path [skip ci]
ahmedihabb2 Jun 17, 2023
1e4e22f
Avoid assuming bash [skip ci]
ahmedihabb2 Jun 17, 2023
3d5c2b3
Avoid assuming bash [skip ci]
ahmedihabb2 Jun 17, 2023
6f5088c
Avoid assuming bash [skip ci]
ahmedihabb2 Jun 17, 2023
84a2f62
SSH [skip ci]
ahmedihabb2 Jun 17, 2023
31d33f8
Avoid assuming bash [skip ci]
ahmedihabb2 Jun 17, 2023
b4b2353
Try to fix jni [skip ci]
ahmedihabb2 Jun 17, 2023
df4e6a7
Try fixing java paths [skip ci]
ahmedihabb2 Jun 18, 2023
3d2cc3e
Try fixing java paths [skip ci]
ahmedihabb2 Jun 18, 2023
3699755
Final touch
ahmedihabb2 Jun 18, 2023
73457a1
Revert C changes
ahmedihabb2 Jun 19, 2023
258990a
Update macos-test.yml
viferga Jun 30, 2023
003b117
Merge branch 'develop' into some-fixes
viferga Jun 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/macos-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
options: [
options: [
{build: debug, sanitizer: without-sanitizer},
{build: debug, sanitizer: address-sanitizer},
{build: debug, sanitizer: thread-sanitizer},
Expand Down Expand Up @@ -53,22 +53,31 @@ jobs:
RUBY_FRAMEWORK_DIR=$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks/Ruby.framework
sudo rm -rf $RUBY_FRAMEWORK_DIR

- name: Uninstall Java
run: |
sudo rm -rf /Library/Java/JavaVirtualMachines/*
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
unset JAVA_HOME

- 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 cobol #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage
METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol #netcore5 rust rapidjson funchook swig pack # clangformat v8rep51 coverage

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

- name: Build
working-directory: ./build
# TODO: Remove the disable option for fork safe once funchook problem is solved
run: |
. .env
cmake -DOPTION_FORK_SAFE=OFF ..
bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS
env:
Expand Down
26 changes: 15 additions & 11 deletions tools/metacall-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ sub_python(){
pyenv install 3.11.1
pyenv global 3.11.1
pyenv rehash

# TODO: Avoid this, do no asume bash, find a better way to deal with environment variables
echo -e '\nif command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
source ~/.bash_profile

mkdir -p build
CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt"
ENV_FILE="$ROOT_DIR/build/.env"

echo eval "$(pyenv init -)" >> $ENV_FILE
. $ENV_FILE

echo "-DPython3_INCLUDE_DIRS=$HOME/.pyenv/versions/3.11.1/include/python3.11" >> $CMAKE_CONFIG_PATH
echo "-DPython3_LIBRARY=$HOME/.pyenv/versions/3.11.1/lib/libpython3.11.dylib" >> $CMAKE_CONFIG_PATH
echo "-DPython3_EXECUTABLE=$HOME/.pyenv/versions/3.11.1/bin/python3.11" >> $CMAKE_CONFIG_PATH
Expand Down Expand Up @@ -226,19 +226,15 @@ sub_ruby(){
fi
elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then
brew install ruby@3.2

# TODO: Avoid this, do no asume bash, find a better way to deal with environment variables
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

brew link ruby@3.2 --force --overwrite
mkdir -p build
CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt"
RUBY_PREFIX="$(brew --prefix ruby@3.2)"
RUBY_VERSION="$(ruby -e 'puts RUBY_VERSION')"
echo "-DRuby_INCLUDE_DIR=$RUBY_PREFIX/include/ruby-3.2.0" >> $CMAKE_CONFIG_PATH
echo "-DRuby_LIBRARY=$RUBY_PREFIX/lib/libruby.3.2.dylib" >> $CMAKE_CONFIG_PATH
echo "-DRuby_EXECUTABLE=$RUBY_PREFIX/bin/ruby" >> $CMAKE_CONFIG_PATH
echo "-DRuby_VERSION_STRING=$RUBY_VERSION" >> $CMAKE_CONFIG_PATH
echo "-DRuby_VERSION=$RUBY_VERSION" >> $CMAKE_CONFIG_PATH
fi
}

Expand Down Expand Up @@ -572,6 +568,14 @@ sub_java(){
fi
elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then
brew install openjdk@17
sudo ln -sfn $(brew --prefix openjdk@17)/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
JAVA_PREFIX=$(/usr/libexec/java_home -v 17)
mkdir -p build
CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt"
echo "-DJAVA_HOME=$JAVA_PREFIX" >> $CMAKE_CONFIG_PATH
echo "-DJAVA_INCLUDE_PATH=$JAVA_PREFIX/include" >> $CMAKE_CONFIG_PATH
echo "-DJAVA_INCLUDE_PATH2=$JAVA_PREFIX/include/darwin" >> $CMAKE_CONFIG_PATH
echo "-DJAVA_AWT_INCLUDE_PATH=$JAVA_PREFIX/include" >> $CMAKE_CONFIG_PATH
fi
}

Expand Down