From b00c01520cc8cbfb3d8ed07f99a82cded7b4fee6 Mon Sep 17 00:00:00 2001 From: Danilo Tatoni <36413174+danilotat@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:52:09 +0100 Subject: [PATCH 1/7] ci: testing through apptainer --- .github/workflows/testing.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a5acce5..c2a0b61 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,10 +15,29 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive + + - name: Setup Apptainer + uses: eWaterCycle/setup-apptainer@v2 + with: + apptainer-version: '1.2.5' + + - name: Prepare Test Data and Models + run: | + gzip -d .test/test_data/chr6_cdna.fa.gz + gzip -d .test/test_data/genome_chr6.fa.gz + mv .test/test_data/genome_chr6.fa.gz.fai .test/test_data/genome_chr6.fa.fai + mkdir -p workflow/supplementary_res/deepvariant_rna_model + BASE_URL="https://storage.googleapis.com/deepvariant/models/DeepVariant/1.4.0/DeepVariant-inception_v3-1.4.0+data-rnaseq_standard" + wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.data-00000-of-00001" + wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.example_info.json" + wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.index" + wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.meta" + echo "Files in deepvariant_rna_model:" + ls -l workflow/supplementary_res/deepvariant_rna_model/ + - name: Test workflow uses: snakemake/snakemake-github-action@v1.22.0 with: directory: .test snakefile: .test/Snakefile - args: "--configfile .test/config/config.yaml --use-conda --show-failed-logs --cores 2 --conda-cleanup-pkgs cache" - + args: "--configfile .test/config/config.yaml --use-apptainer --show-failed-logs --cores 2" \ No newline at end of file From 929afff6a1c3bac4eda079394224c7937cac5b5e Mon Sep 17 00:00:00 2001 From: Danilo Tatoni <36413174+danilotat@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:01:07 +0100 Subject: [PATCH 2/7] ci: disable caching for memory saving --- .github/workflows/testing.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c2a0b61..80d3f48 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive - + - name: Setup Apptainer uses: eWaterCycle/setup-apptainer@v2 with: @@ -37,6 +37,8 @@ jobs: - name: Test workflow uses: snakemake/snakemake-github-action@v1.22.0 + env: + APPTAINER_DISABLE_CACHE: "true" with: directory: .test snakefile: .test/Snakefile From 4528b06100b009d01a289010d216b7cd7a70d09e Mon Sep 17 00:00:00 2001 From: Danilo Tatoni <36413174+danilotat@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:10:07 +0100 Subject: [PATCH 3/7] ci: hack for saving space --- .github/workflows/testing.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 80d3f48..505dcf4 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -11,6 +11,18 @@ jobs: Testing: runs-on: ubuntu-latest steps: + # --- FIX FOR DISK SPACE --- + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space-action@v1.3.1 + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - name: Checkout repository with submodules uses: actions/checkout@v3 with: @@ -38,6 +50,7 @@ jobs: - name: Test workflow uses: snakemake/snakemake-github-action@v1.22.0 env: + APPTAINER_DISABLE_CACHE: "true" with: directory: .test From dc0e7a5132394d59a6f9f8a71d3716ded1988ed6 Mon Sep 17 00:00:00 2001 From: Danilo Tatoni <36413174+danilotat@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:11:33 +0100 Subject: [PATCH 4/7] ci: hack for free space --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 505dcf4..52a1128 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -13,7 +13,7 @@ jobs: steps: # --- FIX FOR DISK SPACE --- - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space-action@v1.3.1 + uses: jlumbroso/free-disk-space-action@main with: tool-cache: true android: true From 7657e56bc63676efa6b88d7b062424040c9bef5a Mon Sep 17 00:00:00 2001 From: Danilo Tatoni <36413174+danilotat@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:15:00 +0100 Subject: [PATCH 5/7] fix: hack for saving space --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 52a1128..69fd4d6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -13,7 +13,7 @@ jobs: steps: # --- FIX FOR DISK SPACE --- - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space-action@main + uses: jlumbroso/free-disk-space@main with: tool-cache: true android: true From 664fc256362258edfb1fd7b8abf6c2dbbc5ac9b2 Mon Sep 17 00:00:00 2001 From: Danilo Tatoni <36413174+danilotat@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:33:21 +0100 Subject: [PATCH 6/7] ci: bypassing snakemake github action --- .github/workflows/testing.yml | 55 +++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 69fd4d6..6cd3547 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -10,10 +10,14 @@ on: jobs: Testing: runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} # Required for Conda environments to activate properly + steps: - # --- FIX FOR DISK SPACE --- + # 1. Clear disk space (Crucial for Apptainer + DeepVariant) - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main + uses: jlumbroso/free-disk-space-action@v1.3.1 with: tool-cache: true android: true @@ -22,37 +26,64 @@ jobs: large-packages: true docker-images: true swap-storage: true - - - name: Checkout repository with submodules + + - name: Checkout repository uses: actions/checkout@v3 with: submodules: recursive + # 2. Install Apptainer on the Host - name: Setup Apptainer uses: eWaterCycle/setup-apptainer@v2 with: apptainer-version: '1.2.5' + # 3. Install Snakemake using Mamba (Faster/Native approach) + - name: Setup Mamba/Conda and Install Snakemake + uses: conda-incubator/setup-miniconda@v3 + with: + miniforge-version: latest + activate-environment: snakemake + # Installing snakemake directly here + environment-config: > + name: snakemake + channels: + - conda-forge + - bioconda + - nodefaults + dependencies: + - snakemake + - python=3.10 + + # 4. Prepare your data (Files & Downloads) - name: Prepare Test Data and Models run: | gzip -d .test/test_data/chr6_cdna.fa.gz gzip -d .test/test_data/genome_chr6.fa.gz mv .test/test_data/genome_chr6.fa.gz.fai .test/test_data/genome_chr6.fa.fai + mkdir -p workflow/supplementary_res/deepvariant_rna_model BASE_URL="https://storage.googleapis.com/deepvariant/models/DeepVariant/1.4.0/DeepVariant-inception_v3-1.4.0+data-rnaseq_standard" + wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.data-00000-of-00001" wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.example_info.json" wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.index" wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.meta" - echo "Files in deepvariant_rna_model:" - ls -l workflow/supplementary_res/deepvariant_rna_model/ + + echo "Data preparation complete." + # 5. Run Snakemake directly - name: Test workflow - uses: snakemake/snakemake-github-action@v1.22.0 env: - + # Save disk space by preventing Apptainer from caching the huge SIF files APPTAINER_DISABLE_CACHE: "true" - with: - directory: .test - snakefile: .test/Snakefile - args: "--configfile .test/config/config.yaml --use-apptainer --show-failed-logs --cores 2" \ No newline at end of file + run: | + snakemake \ + --directory .test \ + --snakefile .test/Snakefile \ + --configfile .test/config/config.yaml \ + --use-apptainer \ + --use-conda \ + --show-failed-logs \ + --cores 2 \ + --conda-cleanup-pkgs cache \ No newline at end of file From 01bb5ece8725bb874a65d745701ce258f59ef537 Mon Sep 17 00:00:00 2001 From: Danilo Tatoni <36413174+danilotat@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:34:30 +0100 Subject: [PATCH 7/7] ci: bypass snakemake ga --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6cd3547..530ab62 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -17,7 +17,7 @@ jobs: steps: # 1. Clear disk space (Crucial for Apptainer + DeepVariant) - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space-action@v1.3.1 + uses: jlumbroso/free-disk-space@main with: tool-cache: true android: true