Skip to content

Commit

Permalink
Compability with latest stable: nextflow:v24.04.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tillenglert committed Sep 30, 2024
1 parent 2496812 commit e1d5021
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ jobs:
strategy:
fail-fast: false
matrix:
java_version: [8, 11]
java_version: [11, 21]

steps:
- name: Environment
run: env | sort

- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true

- name: Setup Java ${{ matrix.java_version }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{matrix.java_version}}
architecture: x64
distribution: 'temurin'

- name: Compile
run: ./gradlew assemble

- name: Tests
run: ./gradlew check
env:
GRADLE_OPTS: '-Dorg.gradle.daemon=false'

GRADLE_OPTS: '-Dorg.gradle.daemon=false'
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ NXF_HOME ?= $$HOME/.nextflow
NXF_PLUGINS_DIR ?= $(NXF_HOME)/plugins

clean:
rm -rf .nextflow*
rm -rf work
rm -rf build
rm -rf plugins/*/build
./gradlew clean

compile:
Expand Down Expand Up @@ -48,6 +52,9 @@ else
./gradlew ${mm}test --tests ${class}
endif

assemble:
./gradlew assemble

install:
./gradlew copyPluginZip
rm -rf ${NXF_PLUGINS_DIR}/nf-co2footprint-${version}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package nextflow.co2footprint

import java.nio.file.Files
import java.util.jar.Manifest

import nextflow.Channel
import nextflow.plugin.Plugins
import nextflow.plugin.TestPluginDescriptorFinder
Expand Down Expand Up @@ -36,8 +39,16 @@ class CO2FootprintDslTest extends Dsl2Spec{
protected PluginDescriptorFinder createPluginDescriptorFinder() {
return new TestPluginDescriptorFinder(){
@Override
protected Path getManifestPath(Path pluginPath) {
return pluginPath.resolve('build/resources/main/META-INF/MANIFEST.MF')
protected Manifest readManifestFromDirectory(Path pluginPath) {
if( !Files.isDirectory(pluginPath) )
return null

final manifestPath = pluginPath.resolve('build/resources/main/META-INF/MANIFEST.MF')
if( !Files.exists(manifestPath) )
return null

final input = Files.newInputStream(manifestPath)
return new Manifest(input)
}
}
}
Expand Down

0 comments on commit e1d5021

Please sign in to comment.