Switched to OpenGL ES texture - removed GrGlInterface. Fixed blank ou… #657
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gw | |
on: | |
push: | |
pull_request: | |
env: | |
version: 1.1.0 | |
jobs: | |
mingw: | |
strategy: | |
fail-fast: false | |
matrix: | |
sys: [ucrt64] # clang64, | |
name: ${{ matrix.sys }} | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.sys }} | |
update: true | |
install: make | |
pacboy: toolchain:p glfw:p skia:p htslib:p freeglut:p glew:p ncurses:p fontconfig:p dlfcn:p libpng:p | |
- name: build | |
run: | | |
make | |
- name: upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mingw-${{ matrix.sys }} | |
path: ${{ github.workspace }}/*.exe | |
macos-package: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-14 ] # macos-12, | |
include: | |
- os: macos-12 | |
arch: intel | |
- os: macos-14 | |
arch: m1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
brew install imagemagick graphicsmagick dylibbundler glfw fontconfig | |
# npm broken for python3.12 so use this as work around | |
brew list | grep python@ | |
# brew unlink [email protected] | |
shopt -s expand_aliases | |
alias python=$(brew --prefix)/bin/python3.11 | |
alias python3=$(brew --prefix)/bin/python3.11 | |
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.12 | |
sudo rm -f /usr/local/bin/python3 | |
sudo rm -f /Library/Frameworks/Python.framework/Versions/Current/bin/python | |
which python && python --version | |
which python3 && python --version | |
python -m pip install packaging | |
python3 -m pip install packaging | |
npm install --global create-dmg | |
- name: Build and install htslib with libdeflate | |
run: | | |
wget -O htslib.tar.bz2 https://github.com/samtools/htslib/releases/download/1.20/htslib-1.20.tar.bz2 | |
tar -xvf htslib.tar.bz2 && mv htslib-* htslib && rm htslib.tar.bz2 | |
git clone --depth 1 https://github.com/ebiggers/libdeflate.git | |
cd libdeflate && CFLAGS+=' -fPIC -O3 ' cmake -B build && CFLAGS+=' -fPIC -O3 ' cmake --build build | |
cp build/libdeflate.a ../htslib | |
cp libdeflate.h ../htslib | |
ls ../htslib | |
cd ../htslib | |
LDFLAGS="$LDFLAGS -L./" CPPFLAGS="$CPPFLAGS -I./" ./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2 --with-libdeflate | |
make | |
sudo make install | |
- name: Make Prep | |
run: | | |
make prep | |
- name: package | |
run: | | |
osacompile -o gw.app deps/gw_applescript_prog.txt | |
cp deps/gw_droplet.icns gw.app/Contents/Resources/droplet.icns | |
echo "BUILDING GW" | |
brew_lib=$(brew --prefix)/lib | |
brew_include=$(brew --prefix)/include | |
brew_bin=$(brew --prefix)/bin | |
LDFLAGS="${LDFLAGS} -L${brew_lib}" CPPFLAGS="${CPPFLAGS} -I${brew_include}" make | |
mv gw ./gw.app/Contents/MacOS | |
rm -rf include lib src Makefile | |
PATH="$PATH:$brew_bin" dylibbundler -od -b -x ./gw.app/Contents/MacOS/gw -d ./gw.app/Contents/libs/ -p @executable_path/../libs/ | |
echo "VALIDATION" | |
otool -L gw.app/Contents/MacOS/gw | |
echo "" | |
echo "CODE SIGNING" | |
ls -l | |
sudo chown -R $(whoami) ./gw.app | |
chmod -R a+rw ./gw.app | |
sudo codesign --remove-signature ./gw.app | |
sudo codesign --force --deep -s - gw.app -v | |
sudo codesign --verify -vvvv gw.app | |
PATH="$PATH:$brew_bin" create-dmg 'gw.app' || true | |
ls | |
mv gw\ undefined.dmg gw_macos_${{ matrix.arch }}.dmg | |
ls | |
pwd | |
- name: upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gw_macos_${{ matrix.arch }} | |
path: ./*.dmg | |
deb-package: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install dh-make build-essential debhelper dh-virtualenv | |
sudo apt-get install debugedit devscripts fakeroot debootstrap pbuilder autotools-dev | |
sudo apt install zlib1g-dev libbz2-dev liblzma-dev libncurses5-dev libncursesw5-dev libssl-dev | |
sudo apt install libgl1-mesa-dev libfontconfig-dev libcurl4-openssl-dev libglfw3 libglfw3-dev | |
- name: build | |
run: | | |
BUILD_DIR=$(pwd) | |
mkdir -p usr/bin | |
mkdir -p usr/lib/x86_64-linux-gnu | |
mkdir -p usr/lib/gwhts | |
mkdir -p usr/include/gwhts | |
mkdir -p usr/share/icons | |
mkdir -p usr/share/icons/hicolor/512x512/apps/ | |
mkdir -p usr/share/applications | |
sudo mkdir -p /usr/lib/gwhts | |
sudo mkdir -p /usr/include/gwhts/htslib | |
sudo cp /usr/lib/x86_64-linux-gnu/libglfw* usr/lib/x86_64-linux-gnu/. | |
git clone --depth 1 https://github.com/ebiggers/libdeflate.git | |
cd libdeflate && CFLAGS+=' -fPIC -O3 ' cmake -B build && CFLAGS+=' -fPIC -O3 ' cmake --build build | |
sudo cp build/libdeflate.a /usr/local/lib && sudo cp libdeflate.h /usr/local/include | |
echo "LIBDEFLATE BUILT" && pwd | |
cd ${BUILD_DIR} | |
wget -O htslib.tar.bz2 https://github.com/samtools/htslib/releases/download/1.20/htslib-1.20.tar.bz2 | |
tar -xvf htslib.tar.bz2 | |
mv htslib-1.20 htslib && rm htslib.tar.bz2 && cd htslib | |
sed -i 's/ -g -Wall/ -Wall/' Makefile # strip debug information | |
./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2 --with-libdeflate | |
make -j3 | |
echo "HTSLIB BUILT" && pwd | |
cp -rf htslib ../include | |
sudo cp libhts.* /usr/lib/gwhts | |
sudo cp htslib/*.h /usr/include/gwhts/htslib | |
cp libhts.* ${BUILD_DIR}/usr/lib/gwhts | |
cd ${BUILD_DIR} | |
sed -i '133 i \\t-mv gw usr/bin' Makefile | |
sed -i 's@-L/usr/local/lib@-L/usr/local/lib -L/usr/lib/gwhts@g' Makefile | |
make prep | |
cp include/gw_icon.png usr/share/icons/ | |
cp include/gw_icon.png usr/share/icons/hicolor/512x512/apps/ | |
cp deps/gw.desktop usr/share/applications/ | |
- name: package | |
run: | | |
dh_make --single --createorig --packagename gw_${version} --email [email protected] --yes --native | |
printf "usr/bin/gw\nusr/share/icons/gw_icon.png\nusr/share/applications/gw.desktop\nusr/lib/gwhts/\nusr/lib/x86_64-linux-gnu/libglfw.so.3\nusr/lib/x86_64-linux-gnu/libglfw.so.3.3" > debian/install | |
export LDFLAGS="$LDFLAGS -L./lib/skia/out/Release-x64 -L/usr/local/lib -L/usr/lib -L./usr/lib/gwhts -Wl,-rpath,'$ORIGIN/../lib/gwhts'" | |
sed -i '/^Section/c\Section: Bioinformatics' debian/control | |
sed -i '/^Homepage/c\Homepage: https://github.com/kcleal/gw' debian/control | |
sed -i '/^Description/c\Description: Genome browser and variant annotation' debian/control | |
sed -i '/<insert long/d' debian/control | |
printf "Conflicts: libglfw3 (<< 3.3)\nReplaces: libglfw3\n" >> debian/control | |
# Override dh_shlibdeps to include /usr/lib/gwhts | |
printf '#!/usr/bin/make -f\n%%:\n\tdh $@\n\nclean:\n\tdh_clean\n\noverride_dh_shlibdeps:\n\tdh_shlibdeps -l/usr/lib/gwhts\n' > debian/rules | |
chmod +x debian/rules | |
dpkg-buildpackage -us -uc | |
- name: upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debian-package | |
path: /home/runner/work/gw/*.deb |