From a3e31180724ade0da84b72a5dd5658a50ae5f399 Mon Sep 17 00:00:00 2001 From: Jacob Kahn Date: Wed, 28 Feb 2024 15:21:41 -0500 Subject: [PATCH 1/6] setup --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..adc32809 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: Build and run tests + +on: [push, pull_request] + +jobs: + build_and_test_cpu: + name: Build wheels on ${{ matrix.os }} ${{ matrix.label }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, windows-2022, macOS-12] + steps: + - uses: actions/checkout@v4 + + - name: Build project + run: | + cmake -S . -B build -DBUILD_SHARED_LIBS=ON + cmake --build build --parallel + + + # build_and_test_python: + # name: Build wheels on ${{ matrix.os }} ${{ matrix.label }} + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # os: [ubuntu-22.04, windows-2022, macOS-12] + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.12' + + # # Use a venv for macOS runners + # - name: Create Python virtual environment + # run: | + # python3 -m venv _flashlight-text-env + # source _flashlight-text-env/bin/activate + # echo "PATH=$PATH" >> $GITHUB_ENV + # if: runner.os == 'macOS' + + # - name: "Install Python Bindings" + # run: | + # pip install numpy + # USE_CUDA=<< parameters.use_cuda >> pip install -v . + + # - name: Run Python binding tests + # run: | + # cd bindings/python/test + # USE_CUDA=<< parameters.use_cuda >> python -m unittest discover -v . From 55212d876340cba8fc2d366b12de7f59ff0d5afd Mon Sep 17 00:00:00 2001 From: Jacob Kahn Date: Wed, 28 Feb 2024 19:55:05 -0500 Subject: [PATCH 2/6] do these gpu images work? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adc32809..ecd6c550 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2022, macOS-12] + os: [ubuntu-22.04, windows-2022, macOS-12, 4-core-ubuntu-gpu-t4, 4-core-windows-gpu-t4] steps: - uses: actions/checkout@v4 From 2ac21f9be6aa10fb17f82be8364346f9ccb14e96 Mon Sep 17 00:00:00 2001 From: Jacob Kahn Date: Fri, 1 Mar 2024 17:07:20 -0500 Subject: [PATCH 3/6] kick off a gha run --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecd6c550..373fb8bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ jobs: cmake --build build --parallel + + # build_and_test_python: # name: Build wheels on ${{ matrix.os }} ${{ matrix.label }} # runs-on: ${{ matrix.os }} From 2a8151e01b5f3b218c5a807148be8c740c0f3be7 Mon Sep 17 00:00:00 2001 From: jacobkahn Date: Fri, 22 Mar 2024 21:28:12 -0700 Subject: [PATCH 4/6] CMake --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 373fb8bd..7d67baa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install CMake + run: | + sudo apt-get update + sudo apt-get install -y cmake + if: runner.os == 'ubuntu-22.04' + + - name: Install CMake + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' + if: runner.os == 'windows-2022' + - name: Build project run: | cmake -S . -B build -DBUILD_SHARED_LIBS=ON From b19028ad6da41eb71d11b4c2e80699a7ab1d1e3d Mon Sep 17 00:00:00 2001 From: jacobkahn Date: Fri, 22 Mar 2024 21:30:44 -0700 Subject: [PATCH 5/6] os --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d67baa6..eb3c1193 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,12 +16,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y cmake - if: runner.os == 'ubuntu-22.04' + if: runner.os == '4-core-ubuntu-gpu-t4' - name: Install CMake run: | choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' - if: runner.os == 'windows-2022' + if: runner.os == '4-core-windows-gpu-t4' - name: Build project run: | From 05ef2dd4c7bdfadf7c440995db2373db0bab3741 Mon Sep 17 00:00:00 2001 From: jacobkahn Date: Fri, 22 Mar 2024 21:33:27 -0700 Subject: [PATCH 6/6] runner.name --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb3c1193..4057db32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,12 +16,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y cmake - if: runner.os == '4-core-ubuntu-gpu-t4' + if: runner.name == '4-core-ubuntu-gpu-t4' - name: Install CMake run: | choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' - if: runner.os == '4-core-windows-gpu-t4' + if: runner.name == '4-core-windows-gpu-t4' - name: Build project run: |