From 12c72821ce22492edcee4c24b7b9b08d314aa18a Mon Sep 17 00:00:00 2001 From: Inge Amlien Date: Mon, 27 May 2024 11:58:50 +0000 Subject: [PATCH 1/6] sep db / import steps --- .github/workflows/test_build.yaml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml index 896f0b4..d95fead 100644 --- a/.github/workflows/test_build.yaml +++ b/.github/workflows/test_build.yaml @@ -34,20 +34,14 @@ jobs: - name: Make 3rdparty run: make 3rdparty - - name: Run & Import DB + - name: Start DB run: | make run_db & P1=$! + sleep 30 + wait $P1 + - name: Run & Import DB + run: | set -e # Enable error handling make run_dbimport - import_status=$? - - wait $P1 - - if [ $import_status -eq 0 ]; then - echo "Data import succeeded." - else - echo "Data import failed." - exit 1 - fi From 6e39e590c550ee88a097ca7cd814cfabe9b6bae5 Mon Sep 17 00:00:00 2001 From: Inge Amlien Date: Mon, 27 May 2024 12:27:02 +0000 Subject: [PATCH 2/6] Add gha cache. Fix db step timeout? --- .github/workflows/test_build.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml index d95fead..556e03a 100644 --- a/.github/workflows/test_build.yaml +++ b/.github/workflows/test_build.yaml @@ -25,6 +25,22 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cache Downloaded Tarballs + uses: actions/cache@v3 + with: + path: 3rdparty/download + key: ${{ runner.os }}-3rdparty-download-${{ hashFiles('3rdparty/download/*') }} + restore-keys: | + ${{ runner.os }}-3rdparty-download- + + - name: Cache Built Artifacts + uses: actions/cache@v3 + with: + path: 3rdparty + key: ${{ runner.os }}-3rdparty-build-${{ matrix.config.os }}-${{ matrix.config.r }}-${{ hashFiles('3rdparty/download/*') }} + restore-keys: | + ${{ runner.os }}-3rdparty-build-${{ matrix.config.os }}-${{ matrix.config.r }}- + - uses: r-lib/actions/setup-r@v2 id: install-r with: @@ -37,9 +53,7 @@ jobs: - name: Start DB run: | make run_db & - P1=$! sleep 30 - wait $P1 - name: Run & Import DB run: | From 7c273bb5ecc3d2ab0ecaa8d3be499308a8856353 Mon Sep 17 00:00:00 2001 From: Inge Amlien Date: Tue, 28 May 2024 08:28:50 +0000 Subject: [PATCH 3/6] Check gha cache works, skip R 4.3 build --- .github/workflows/test_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml index 556e03a..0895780 100644 --- a/.github/workflows/test_build.yaml +++ b/.github/workflows/test_build.yaml @@ -16,7 +16,7 @@ jobs: matrix: config: - {os: ubuntu-latest, r: '3.6'} - - {os: ubuntu-latest, r: '4.3'} + # - {os: ubuntu-latest, r: '4.3'} # RPostgreSQL issue - {os: ubuntu-20.04, r: '3.6'} env: From 5f4230c158f17b2f1b183bda395e47cf1d388f14 Mon Sep 17 00:00:00 2001 From: Inge Amlien Date: Tue, 28 May 2024 08:50:43 +0000 Subject: [PATCH 4/6] Update cache configuration for 3rdparty artifacts --- .github/workflows/test_build.yaml | 16 +++++----------- 3rdparty/Makefile | 1 + 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml index 0895780..ee1269f 100644 --- a/.github/workflows/test_build.yaml +++ b/.github/workflows/test_build.yaml @@ -25,21 +25,15 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Cache Downloaded Tarballs - uses: actions/cache@v3 - with: - path: 3rdparty/download - key: ${{ runner.os }}-3rdparty-download-${{ hashFiles('3rdparty/download/*') }} - restore-keys: | - ${{ runner.os }}-3rdparty-download- - name: Cache Built Artifacts uses: actions/cache@v3 with: - path: 3rdparty - key: ${{ runner.os }}-3rdparty-build-${{ matrix.config.os }}-${{ matrix.config.r }}-${{ hashFiles('3rdparty/download/*') }} - restore-keys: | - ${{ runner.os }}-3rdparty-build-${{ matrix.config.os }}-${{ matrix.config.r }}- + path: 3rdparty + key: ${{ runner.os }}-3rdparty-${{ matrix.config.os }}-${{ matrix.config.r }}-${{ hashFiles('Makefile', '3rdparty/**/Makefile', '3rdparty/**/*.mk') }} + restore-keys: | + ${{ runner.os }}-3rdparty-${{ matrix.config.os }}-${{ matrix.config.r }}- + - uses: r-lib/actions/setup-r@v2 id: install-r diff --git a/3rdparty/Makefile b/3rdparty/Makefile index fb18ca3..76a6366 100644 --- a/3rdparty/Makefile +++ b/3rdparty/Makefile @@ -21,3 +21,4 @@ download: $(addsuffix _download, $(modules)) clean: $(addsuffix _clean, $(modules)) $(MAKE) -f make_rpacs.mk clean +# Bump comment to check cache invalidation \ No newline at end of file From 6cabaca3915b6c8a3ce2012d697c3061bc62687d Mon Sep 17 00:00:00 2001 From: Inge Amlien Date: Tue, 28 May 2024 09:09:23 +0000 Subject: [PATCH 5/6] Update GitHub Actions checkout/cache to version 4 (node 16>20) --- .github/workflows/test_build.yaml | 4 ++-- .github/workflows/test_offline.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml index ee1269f..1a56b10 100644 --- a/.github/workflows/test_build.yaml +++ b/.github/workflows/test_build.yaml @@ -23,11 +23,11 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Built Artifacts - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: 3rdparty key: ${{ runner.os }}-3rdparty-${{ matrix.config.os }}-${{ matrix.config.r }}-${{ hashFiles('Makefile', '3rdparty/**/Makefile', '3rdparty/**/*.mk') }} diff --git a/.github/workflows/test_offline.yaml b/.github/workflows/test_offline.yaml index 6a26070..de24cb0 100644 --- a/.github/workflows/test_offline.yaml +++ b/.github/workflows/test_offline.yaml @@ -21,7 +21,7 @@ jobs: - {os: ubuntu-20.04, r: '3.6'} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 id: install-r From a1ad9945b78ff05af04825800fe4a5c641942ceb Mon Sep 17 00:00:00 2001 From: Inge Amlien Date: Tue, 28 May 2024 09:26:44 +0000 Subject: [PATCH 6/6] Check cache invalidation --- .github/workflows/test_build.yaml | 20 ++++++++++++++++++++ 3rdparty/Makefile | 2 -- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml index 1a56b10..1148a79 100644 --- a/.github/workflows/test_build.yaml +++ b/.github/workflows/test_build.yaml @@ -53,3 +53,23 @@ jobs: run: | set -e # Enable error handling make run_dbimport + + + # test: + # needs: noas-check + # runs-on: ${{ needs.noas-check.outputs.matrix-config.os }} + # name: Test on ${{ needs.noas-check.outputs.matrix-config.os }} with R ${{ needs.noas-check.outputs.matrix-config.r }} + # steps: + # - uses: actions/checkout@v4 + + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.10' + + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install -r requirements.txt + + # - name: Run tests + # run: pytest \ No newline at end of file diff --git a/3rdparty/Makefile b/3rdparty/Makefile index 76a6366..42811d0 100644 --- a/3rdparty/Makefile +++ b/3rdparty/Makefile @@ -20,5 +20,3 @@ download: $(addsuffix _download, $(modules)) .PHONY: clean clean: $(addsuffix _clean, $(modules)) $(MAKE) -f make_rpacs.mk clean - -# Bump comment to check cache invalidation \ No newline at end of file