Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #637

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #637

Workflow file for this run

name: build
on: [push, pull_request]
env:
APT_DEPS: libzstd-dev samtools tabix libhts-dev pigz python3-pip libcurl4-openssl-dev
BREW_DEPS: zstd samtools pigz coreutils sqlite
PIP_DEPS: pytest pytest-xdist
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: deps
run: |
sudo apt-get -qq update
sudo apt-get install -y clang-format cppcheck python3-pip
sudo pip3 install --system pre-commit $PIP_DEPS black flake8 pylint
- name: pre-commit
run: pre-commit run --all-files
- name: mvn spotless:check
run: mvn spotless:check -B -f bindings/jdbc/genomicsqlite-jdbc/pom.xml
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy
toolchain: stable
default: true
- name: rust lint
run: |
cd bindings/rust
./cargo check --no-default-features
./cargo fmt -- --check
test:
runs-on: ubuntu-20.04
strategy:
matrix:
BUILD_TYPE: [Debug, Release]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: deps
run: |
sudo apt-get -qq update
sudo apt-get install -y $APT_DEPS
sudo pip3 install --system $PIP_DEPS
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- name: build
run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -B build . && cmake --build build -j $(nproc)
- name: test
run: env -C build SQLITE_WEB_LOG=99 ctest -V
linux-x86-64-so:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build loaders
run: |
sudo apt-get -qq update
sudo apt-get install -y $APT_DEPS
sudo pip3 install --system $PIP_DEPS
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' -B build . && cmake --build build -j $(nproc)
rm build/libgenomicsqlite.so
sudo apt-get remove -y libzstd-dev # should be linked into libgenomicsqlite.so
- name: build portable .so in docker
run: docker build -t genomicsqlite . && docker run -v $(pwd):/mnt --rm genomicsqlite cp /usr/local/lib/{libgenomicsqlite.so,libsqlite3.so.0} /mnt/build/
- name: symbols & digests
run: |
readelf -d build/libgenomicsqlite.so
ldd -r build/libgenomicsqlite.so
echo "----"
echo "libgenomicsqlite.so GLIBC version requirements:"
objdump -t build/libgenomicsqlite.so | grep -o 'GLIBC_.*' | sort -Vr | head -n1
objdump -t build/libgenomicsqlite.so | grep -o 'GLIBCXX_.*' | sort -Vr | head -n1
echo "libsqlite3.so.0 GLIBC version requirements:"
objdump -t build/libsqlite3.so.0 | grep -o 'GLIBC_.*' | sort -Vr | head -n1
echo "----"
sha256sum build/libgenomicsqlite.so build/libsqlite3.so.0
sudo cp build/libsqlite3.so.0 /usr/local/lib
sudo ldconfig
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- name: test portable .so
run: env -C build SQLITE_WEB_LOG=99 ctest -V
- name: test rust crate
run: |
set -e
cp build/libgenomicsqlite.so bindings/rust
SQLITE_WEB_LOG=99 bindings/rust/cargo test --release
bindings/rust/cargo package --list | grep libgenomicsqlite.so
- name: prepare artifacts
run: cp build/{libgenomicsqlite.so,libsqlite3.so.0} .
- uses: actions/upload-artifact@v2
with:
name: libgenomicsqlite.so
path: libgenomicsqlite.so
- uses: actions/upload-artifact@v2
with:
name: libsqlite3.so.0
path: libsqlite3.so.0
macOS-x86-64-dylib:
runs-on: macOS-11
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: dependencies
run: |
rm -f /usr/local/bin/2to3 # https://github.com/pypa/pipenv/issues/3831
brew update || (sleep 2; brew update)
for dep in $BREW_DEPS ; do
brew install $dep || brew upgrade $dep
done
pip install $PIP_DEPS
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- name: build environment
run: |
echo "PATH=$(brew --prefix)/bin:$(brew --prefix)/opt/sqlite/bin:${PATH}" >> $GITHUB_ENV
echo "CFLAGS=-I$(brew --prefix)/include -I$(brew --prefix)/opt/sqlite/include -march=ivybridge" >> $GITHUB_ENV
echo "CXXFLAGS=-I$(brew --prefix)/include -I$(brew --prefix)/opt/sqlite/include -march=ivybridge" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix)/lib -L$(brew --prefix)/opt/sqlite/lib" >> $GITHUB_ENV
# used by rusqlite:
echo "SQLITE3_INCLUDE_DIR=$(brew --prefix)/opt/sqlite/include" >> $GITHUB_ENV
echo "SQLITE3_LIB_DIR=$(brew --prefix)/opt/sqlite/lib" >> $GITHUB_ENV
- name: build
run: |
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$(brew --prefix)/opt/sqlite \
-B build .
cmake --build build -j 4
- name: symbols & digests
run: |
otool -L build/libgenomicsqlite.dylib
sha256sum build/libgenomicsqlite.dylib
- name: ctest
run: |
cd build
otool -L test/capi_smoke_test
SQLITE_WEB_LOG=99 ctest -V
- name: test rust crate
run: |
set -e
cp build/libgenomicsqlite.dylib bindings/rust
SQLITE_WEB_LOG=99 bindings/rust/cargo test --release
bindings/rust/cargo package --list | grep libgenomicsqlite.dylib
- name: prepare artifacts
run: cp build/libgenomicsqlite.dylib include/genomicsqlite.h .
- uses: actions/upload-artifact@v2
with:
name: libgenomicsqlite.dylib
path: libgenomicsqlite.dylib
artifacts:
runs-on: ubuntu-20.04
needs: [linux-x86-64-so, macOS-x86-64-dylib]
steps:
- uses: actions/checkout@v2
- name: fetch libgenomicsqlite.so
uses: actions/[email protected]
with:
name: libgenomicsqlite.so
- name: fetch libsqlite3.so.0
uses: actions/[email protected]
with:
name: libsqlite3.so.0
- name: fetch libgenomicsqlite.dylib
uses: actions/[email protected]
with:
name: libgenomicsqlite.dylib
- name: detect GIT_REVISION
run: |
cp include/genomicsqlite.h .
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
with:
name: GenomicSQLite-${{ env.GIT_REVISION }}
path: |
LICENSE
genomicsqlite.h
libgenomicsqlite.so
libgenomicsqlite.dylib
- name: build jar
run: |
cp libgenomicsqlite.so libgenomicsqlite.dylib bindings/jdbc/genomicsqlite-jdbc/src/main/resources/
mvn deploy -Drevision=${{ env.GIT_REVISION }} -B -f bindings/jdbc/genomicsqlite-jdbc/pom.xml
- name: digests
run: sha256sum *genomicsqlite* bindings/jdbc/genomicsqlite-jdbc/target/genomicsqlite*.jar libsqlite3.so.0
- uses: actions/upload-artifact@v2
with:
name: genomicsqlite-jdbc-${{ env.GIT_REVISION }}
path: bindings/jdbc/genomicsqlite-jdbc/target/mvn-repo