Skip to content

Commit

Permalink
Update actions (#65)
Browse files Browse the repository at this point in the history
* sep db / import steps

* Add gha cache. Fix db step timeout?

* Check gha cache works, skip R 4.3 build

* Update cache configuration for 3rdparty artifacts

* Update GitHub Actions checkout/cache to version 4 (node 16>20)

* Check cache invalidation
  • Loading branch information
kasbohm authored May 28, 2024
1 parent 303081c commit 02dff09
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/test_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,24 @@ 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:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4


- name: Cache Built Artifacts
uses: actions/cache@v4
with:
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
Expand All @@ -34,20 +44,32 @@ jobs:
- name: Make 3rdparty
run: make 3rdparty

- name: Run & Import DB
- name: Start DB
run: |
make run_db &
P1=$!
sleep 30
- 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
# 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
2 changes: 1 addition & 1 deletion .github/workflows/test_offline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion 3rdparty/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ download: $(addsuffix _download, $(modules))
.PHONY: clean
clean: $(addsuffix _clean, $(modules))
$(MAKE) -f make_rpacs.mk clean

0 comments on commit 02dff09

Please sign in to comment.