Skip to content

reimpl of q-filtering #607

reimpl of q-filtering

reimpl of q-filtering #607

Workflow file for this run

name: lunabase CI
on:
push:
branches: master
tags: v*
pull_request:
branches: master
tags: v*
jobs:
windows-build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: zip mingw-w64-x86_64-cmake git gcc mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib mingw-w64-x86_64-fftw
- run: |
cd ${HOME}
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
/mingw64/bin/cmake.exe -G "MinGW Makefiles" ..
mingw32-make.exe -j4
cp ${HOME}/LightGBM/lib_lightgbm.dll /mingw64/bin/
- uses: actions/checkout@v2
- run: |
mingw32-make.exe ARCH=WINDOWS LGBM=1 LGBM_PATH=${HOME}/LightGBM
ref='refs/tags/v'
if [[ ${{ github.ref }} == *${ref}* ]]; then
v=$(echo ${{ github.ref }} | cut -d'/' -f3)
mkdir luna-${v}
cp *.exe /mingw64/bin/libfftw3-3.dll /mingw64/bin/lib_lightgbm.dll /mingw64/bin/libgcc_s_seh-1.dll /mingw64/bin/libgomp-1.dll /mingw64/bin/libwinpthread-1.dll luna-${v}/
zip -r win-luna.zip luna-${v}
fi
- uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: win-luna.zip
path: ./win-luna.zip
macos-build:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Install LightGBM
run: |
cd ${HOME}
brew install cmake
brew install libomp
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake ..
make -j4
- name: Install fftw
run: |
cd $HOME
wget http://www.fftw.org/fftw-3.3.8.tar.gz
tar -xzvf fftw-3.3.8.tar.gz
cd fftw-3.3.8
./configure --prefix=${HOME}/fftw-3.3.8/
make
make install
cd ${GITHUB_WORKSPACE}
- name: Make
run: |
[[ -e ${HOME}/LightGBM/lib_lightgbm.so ]] && cp ${HOME}/LightGBM/lib_lightgbm.dylib .
[[ -e ${HOME}/LightGBM/lib_lightgbm.dylib ]] && cp ${HOME}/LightGBM/lib_lightgbm.dylib .
make ARCH=MAC FFTW=${HOME}/fftw-3.3.8 LGBM=1 LGBM_PATH=${HOME}/LightGBM
ref='refs/tags/v'
if [[ ${{ github.ref }} == *${ref}* ]]; then
v=$(echo ${{ github.ref }} | cut -d'/' -f3)
mkdir luna-${v}
cp luna destrat behead lib_lightgbm.dylib luna-${v}/
cd luna-${v}/
install_name_tool -add_rpath @executable_path/. ./luna
install_name_tool -add_rpath @executable_path/. ./destrat
install_name_tool -add_rpath @executable_path/. ./behead
otool -l ./luna
cd ..
tar cvzf mac-luna.tar.gz luna-${v}/
fi
- uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: mac-luna.tar.gz
path: mac-luna.tar.gz
macos-arm64-build:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
cd ${HOME}
brew install cmake gcc boost
- name: Clone and build LightGBM
run: |
cd ${HOME}
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_OPENMP=OFF -DBUILD_STATIC_LIB=ON ..
make -j4
- name: Build FFTW
run: |
cd ${HOME}
wget http://www.fftw.org/fftw-3.3.10.tar.gz
tar -xzvf fftw-3.3.10.tar.gz
cd fftw-3.3.10
./configure --prefix=$HOME/fftw-3.3.10 CFLAGS="-arch arm64"
make
make install
- name: Final Build
run: |
make ARCH=MAC LGBM=1 LGBM_PATH=${HOME}/LightGBM/ FFTW=$HOME/fftw-3.3.10
ref='refs/tags/v'
if [[ ${{ github.ref }} == *${ref}* ]]; then
v=$(echo ${{ github.ref }} | cut -d'/' -f3)
mkdir luna-${v}
cp luna destrat behead luna-${v}/
cd luna-${v}/
otool -L ./luna
cd ..
tar cvzf macos-arm64-luna.tar.gz luna-${v}/
fi
- uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: macos-arm64-luna.tar.gz
path: macos-arm64-luna.tar.gz
linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install fftw
run: |
cd ${HOME}
wget http://www.fftw.org/fftw-3.3.8.tar.gz
tar -xzvf fftw-3.3.8.tar.gz
cd fftw-3.3.8
./configure --enable-shared --prefix=${HOME}/fftw-3.3.8/
make
make install
- name: Install LightGBM
run: |
cd ${HOME}
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake ..
make -j4
cd ${GITHUB_WORKSPACE}
- name: make
run: |
make FFTW=${HOME}/fftw-3.3.8 LGBM=1 LGBM_PATH=${HOME}/LightGBM
release:
runs-on: ubuntu-latest
needs: [linux-build, macos-build, windows-build, macos-arm64-build]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: Luna_Release ${{ github.ref }}
draft: "false"
prerelease: "false"
allowUpdates: "true"
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
id: download
with:
path: .
- run: |
echo ${{steps.download.outputs.download-path}}
cd ${{steps.download.outputs.download-path}}
mv mac-luna.tar.gz/mac-luna.tar.gz mac_luna.tar.gz
mv win-luna.zip/win-luna.zip win_luna.zip
mv macos-arm64-luna.tar.gz/macos-arm64-luna.tar.gz macos_arm64_luna.tar.gz
- name: Upload Release Asset Mac
id: upload-release-asset-mac
uses: ncipollo/release-action@v1
with:
artifacts: "mac_luna.tar.gz"
name: "mac_luna.tar.gz"
artifactContentType: "application/gzip"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: "true"
- name: Upload Release Asset Mac arm64
id: upload-release-asset-mac-arm64
uses: ncipollo/release-action@v1
with:
artifacts: "macos_arm64_luna.tar.gz"
name: "macos_arm64_luna.tar.gz"
artifactContentType: "application/gzip"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: "true"
- name: Upload Release Asset Win
id: upload-release-asset-win
uses: ncipollo/release-action@v1
with:
artifacts: "win_luna.zip"
name: "win_luna.zip"
artifactContentType: "application/gzip"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: "true"