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

feat: Support Macos on CI #1769

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
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
52 changes: 52 additions & 0 deletions .github/workflows/pika.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,55 @@ jobs:
source /opt/rh/devtoolset-10/enable
ctest -C ${{env.BUILD_TYPE}}

build_on_macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: cache dependencies
uses: actions/cache@v2
id: cache
with:
path: |
${{ github.workspace }}/${{ env.INSTALL_LOCATION }}
~/.cache/pip
key: ${{ runner.os }}-dependencies

- name: install Deps
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
brew update
brew install autoconf protobuf python llvm wget git
brew install gcc@10 automake cmake make binutils
python3 -m pip install --upgrade pip
python3 -m pip install redis
export CXX=/usr/local/opt/gcc@10/bin/g++-10
export CC=/usr/local/opt/gcc@10/bin/gcc-10

- name: Build
run: |
cd ${{github.workspace}}
export CC=/usr/local/opt/gcc@10/bin/gcc-10
cmake -B build -S . -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

# - name: Test
# working-directory: ${{github.workspace}}/build
# run: |
# export CC=/usr/local/opt/gcc@10/bin/gcc-10
# ctest -C ${{env.BUILD_TYPE}}

- name: Unit Test
working-directory: ${{github.workspace}}
run: |
cd ${{github.workspace}}
./pikatests.sh all

- name: Start pika master and slave
working-directory: ${{github.workspace}}/build
run: |
cd ${{github.workspace}}/build
chmod +x ../tests/integration/start_master_and_slave.sh
../tests/integration/start_master_and_slave.sh