Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release snapshots workflow #1287

Merged
merged 21 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 207 additions & 34 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ on:

env:
BUILD_TYPE: Release
BUILD_DIR: ${{github.workspace}}/build
BUILD_DIR: './build'
SRC_DIR: './src'
INSTALL_DIR: ${{github.workspace}}/spades
SRC_DIR: ${{github.workspace}}/src
PKG: SPAdes-*-Linux
PKG_LINUX: SPAdes-*-Linux
PKG_MAC: SPAdes-*-Darwin

jobs:
build:
build-linux:
runs-on: self-hosted
name: '🚧 Build SPAdes'
name: '🐧 Build SPAdes for Linux'

steps:
- name: '🧹 Cleanup'
Expand All @@ -35,23 +36,23 @@ jobs:
rm -rf *

- name: '🧰 Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: '⚙️ Install ccache'
uses: hendrikmuhs/[email protected]
with:
variant: sccache
key: sccache-${{env.BUILD_TYPE}}
key: sccache-${{env.BUILD_TYPE}}-linux

- name: '⚙️ Configure CMake'
run: >
cmake
-B ${{env.BUILD_DIR}}
-S ${{env.SRC_DIR}}
-B $BUILD_DIR
-S $SRC_DIR
-DSPADES_USE_NCBISDK=ON -DSPADES_ENABLE_PROJECTS=all
-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}}

- name: '🚧 Build'
run: >
Expand All @@ -61,18 +62,18 @@ jobs:
-t package include_test debruijn_test

- name: '📦 Package'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifacts
name: build-artifacts-linux
path: |
${{env.BUILD_DIR}}/${{env.PKG}}.tar.gz
${{env.BUILD_DIR}}/${{env.PKG_LINUX}}.tar.gz
${{env.BUILD_DIR}}/bin/debruijn_test
${{env.BUILD_DIR}}/bin/include_test

spades-1k-checks:
name: 'E. coli 1k smoke checks'
spades-1k-checks-linux:
name: '🚬 E. coli 1k smoke checks'
runs-on: self-hosted
needs: build
needs: build-linux

steps:
- name: '🧹 Cleanup'
Expand All @@ -82,42 +83,44 @@ jobs:
rm -rf *

- name: '📦 Download package'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
name: build-artifacts-linux
path: ${{env.INSTALL_DIR}}

- name: '📦 Unpack package'
working-directory: ${{env.INSTALL_DIR}}
run: >
tar -zxf ${{env.PKG}}.tar.gz
tar -zxf $PKG_LINUX.tar.gz

- name: '1k multi-cell'
run: >
${{env.INSTALL_DIR}}/${{env.PKG}}/bin/spades.py --test
asl marked this conversation as resolved.
Show resolved Hide resolved
$INSTALL_DIR/$PKG_LINUX/bin/spades.py --test

- name: '1k single-cell'
run: >
${{env.INSTALL_DIR}}/${{env.PKG}}/bin/spades.py --sc --test
$INSTALL_DIR/$PKG_LINUX/bin/spades.py --sc --test

- name: '1k meta'
run: >
${{env.INSTALL_DIR}}/${{env.PKG}}/bin/metaspades.py --test
$INSTALL_DIR/$PKG_LINUX/bin/metaspades.py --test

- name: '1k plasmid'
run: >
${{env.INSTALL_DIR}}/${{env.PKG}}/bin/plasmidspades.py --test
$INSTALL_DIR/$PKG_LINUX/bin/plasmidspades.py --test

- name: '1k rna'
run: >
${{env.INSTALL_DIR}}/${{env.PKG}}/bin/rnaspades.py --test
$INSTALL_DIR/$PKG_LINUX/bin/rnaspades.py --test

- name: '1k corona'
run: >
${{env.INSTALL_DIR}}/${{env.PKG}}/bin/coronaspades.py --test
$INSTALL_DIR/$PKG_LINUX/bin/coronaspades.py --test

spades-unittests:
spades-unittests-linux:
name: 'SPAdes unittests'
runs-on: self-hosted
needs: build
needs: build-linux

steps:
- name: '🧹 Cleanup'
Expand All @@ -127,25 +130,195 @@ jobs:
rm -rf *

- name: '🧰 Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: '📦 Download package'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
name: build-artifacts-linux
path: ${{env.BUILD_DIR}}

- name: '🔎 Include tests'
working-directory: ${{github.workspace}}
run: >
chmod +x $BUILD_DIR/bin/include_test &&
$BUILD_DIR/bin/include_test

- name: '🔎 De-Bruijn tests'
working-directory: ${{github.workspace}}
run: >
chmod +x $BUILD_DIR/bin/debruijn_test &&
$BUILD_DIR/bin/debruijn_test

build-mac:
strategy:
matrix:
include:
- os: macos-13
arch: x86_64
- os: macos-14
arch: arm64

name: '🍎 Build SPAdes for macOS'
runs-on: ${{ matrix.os }}

steps:
- name: '🧹 Cleanup'
run: >
set -e &&
shopt -s dotglob &&
rm -rf *

- name: '🧰 Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: '⚙️ Install dependencies'
run: >
brew install llvm libomp bzip2

- name: '⚙️ Install ccache'
uses: hendrikmuhs/[email protected]
with:
variant: sccache
key: sccache-${{env.BUILD_TYPE}}-${{ matrix.os }}

- name: '⚙️ Configure CMake'
run: >
cmake
-B $BUILD_DIR
-S $SRC_DIR
-DSPADES_USE_NCBISDK=ON -DSPADES_ENABLE_PROJECTS=all
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_EXE_LINKER_FLAGS=-L$(brew --prefix llvm)/lib/c++
-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache

- name: '🚧 Build'
run: >
cmake
--build $BUILD_DIR
-j16
-t package include_test debruijn_test

- name: '📦 Package'
uses: actions/upload-artifact@v4
with:
name: build-artifacts-mac-${{ matrix.arch }}
path: |
${{env.BUILD_DIR}}/${{env.PKG_MAC}}.tar.gz
${{env.BUILD_DIR}}/bin/debruijn_test
${{env.BUILD_DIR}}/bin/include_test

spades-1k-checks-mac:
name: '🚬 E. coli 1k smoke checks'
strategy:
matrix:
include:
- os: macos-13
arch: x86_64
- os: macos-14
arch: arm64

runs-on: ${{ matrix.os }}

needs: build-mac

steps:
- name: '🧹 Cleanup'
run: >
set -e &&
shopt -s dotglob &&
rm -rf *

- name: '⚙️ Install dependencies'
run: >
brew install llvm libomp bzip2

- name: '📦 Download package'
uses: actions/download-artifact@v4
with:
name: build-artifacts-mac-${{ matrix.arch }}
path: ${{env.INSTALL_DIR}}

- name: '📦 Unpack package'
working-directory: ${{env.INSTALL_DIR}}
run: >
tar -zxf ${{env.PKG_MAC}}.tar.gz

- name: '1k multi-cell'
run: >
$INSTALL_DIR/$PKG_MAC/bin/spades.py --test

- name: '1k single-cell'
run: >
$INSTALL_DIR/$PKG_MAC/bin/spades.py --sc --test

- name: '1k meta'
run: >
$INSTALL_DIR/$PKG_MAC/bin/metaspades.py --test

- name: '1k plasmid'
run: >
$INSTALL_DIR/$PKG_MAC/bin/plasmidspades.py --test

- name: '1k rna'
run: >
$INSTALL_DIR/$PKG_MAC/bin/rnaspades.py --test

- name: '1k corona'
run: >
$INSTALL_DIR/$PKG_MAC/bin/coronaspades.py --test


spades-unittests-mac:
name: 'SPAdes unittests'

strategy:
matrix:
include:
- os: macos-13
arch: x86_64
- os: macos-14
arch: arm64

runs-on: ${{ matrix.os }}

needs: build-mac

steps:
- name: '🧹 Cleanup'
run: >
set -e &&
shopt -s dotglob &&
rm -rf *

- name: '🧰 Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: '📦 Download package'
uses: actions/download-artifact@v4
with:
name: build-artifacts-mac-${{ matrix.arch }}
path: ${{env.BUILD_DIR}}

- name: '⚙️ Install dependencies'
run: >
brew install llvm libomp bzip2

- name: '🔎 Include tests'
working-directory: ${{github.workspace}}
run: >
chmod +x ${{env.BUILD_DIR}}/bin/include_test &&
${{env.BUILD_DIR}}/bin/include_test
chmod +x $BUILD_DIR/bin/include_test &&
$BUILD_DIR/bin/include_test

- name: '🔎 De-Bruijn tests'
working-directory: ${{github.workspace}}
run: >
chmod +x ${{env.BUILD_DIR}}/bin/debruijn_test &&
${{env.BUILD_DIR}}/bin/debruijn_test
chmod +x $BUILD_DIR/bin/debruijn_test &&
$BUILD_DIR/bin/debruijn_test
12 changes: 6 additions & 6 deletions .github/workflows/full_runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
rm -rf *

- name: '🧰 Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand All @@ -54,7 +54,7 @@ jobs:
-t package

- name: '📦 Package'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
Expand All @@ -73,11 +73,11 @@ jobs:
rm -rf *

- name: '🧰 Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: '📦 Download package'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ${{env.INSTALL_DIR}}
Expand Down Expand Up @@ -105,11 +105,11 @@ jobs:
rm -rf *

- name: '🧰 Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: '📦 Download package'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ${{env.INSTALL_DIR}}
Expand Down
Loading