Skip to content

Commit

Permalink
migrate circeci to github actions
Browse files Browse the repository at this point in the history
Summary:
Migrate circleci to github actions.

Test Plan:
Test on github.

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
c-p-i-o committed Oct 28, 2024
1 parent 9a6b9dc commit 10a7f8a
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI
on:
push:
branches:
- main
pull_request:

jobs:
windows_build:
runs-on: windows-latest
env:
gtest_lib_path: c:/googletest
libuv_path: c:/libuv
steps:
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Setup build environment
run: |
conda create -n py376_build python=3.7.6
conda activate py376_build
conda install cmake
- name: Install libuv
run: |
conda activate py376_build
curl https://dist.libuv.org/dist/v1.38.0/libuv-v1.38.0.tar.gz --output libuv-v1.38.0.tar.gz
tar xzvf libuv-v1.38.0.tar.gz
cd libuv-v1.38.0
mkdir -p build
cd build
mkdir ${{ env.gtest_lib_path }}
cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.libuv_path }}
msbuild.exe INSTALL.vcxproj
- name: Install googletest
run: |
conda activate py376_build
curl https://codeload.github.com/google/googletest/tar.gz/release-1.10.0 --output googletest-release-1.10.0.tar.gz
tar xzvf googletest-release-1.10.0.tar.gz
cd googletest-release-1.10.0
mkdir -p build
cd build
mkdir ${{ env.gtest_lib_path }}
cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.gtest_lib_path }} -Dgtest_force_shared_crt=ON
msbuild.exe INSTALL.vcxproj
- name: Build
run: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate py376_build
git submodule sync
git submodule update --init --recursive
mkdir build
cd build
cmake .. \
-DBUILD_TEST=ON \
-Dlibuv_ROOT=${{ env.libuv_path }} \
-DGTEST_LIBRARY=${{ env.gtest_lib_path }}/lib/gtestd.lib \
-DGTEST_INCLUDE_DIR=${{ env.gtest_lib_path }}/include \
-DGTEST_MAIN_LIBRARY=${{ env.gtest_lib_path }}/lib/gtest_maind.lib
msbuild.exe ALL_BUILD.vcxproj
- name: Test
run: |
build/gloo/test/Debug/gloo_test.exe

0 comments on commit 10a7f8a

Please sign in to comment.