Skip to content

Adapt github workflow #19

Adapt github workflow

Adapt github workflow #19

Workflow file for this run

name: build+test
on: push
env:
REGISTRY: ghcr.io
jobs:
build_release:
runs-on: ubuntu-latest
container: ghcr.io/lingo-db/lingodb-dev:latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: CCache
id: ccache
uses: actions/cache@v3
with:
path: /ccache
key: ccache-release-build
- name: Build
run: |
mkdir -p /ccache
export CXX="ccache g++"
export C="ccache gcc"
export CCACHE_DIR="/ccache"
make clean
make build-release
- uses: actions/upload-artifact@master
with:
name: release-build
path: build/lingodb-release
retention-days: 1
build_debug:
runs-on: ubuntu-latest
container: ghcr.io/lingo-db/lingodb-dev:latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: CCache
id: ccache
uses: actions/cache@v3
with:
path: /ccache
key: ccache-debug-build
- name: Build
run: |
mkdir -p /ccache
export CXX="ccache g++"
export C="ccache gcc"
export CCACHE_DIR="/ccache"
make clean
make build-debug
- uses: actions/upload-artifact@master
with:
name: debug-build
path: build/lingodb-debug
retention-days: 1
lint:
runs-on: ubuntu-latest
container: ghcr.io/lingo-db/lingodb-dev:latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
make clean
make venv
make lint
test:
needs: build_debug
runs-on: ubuntu-latest
container: ghcr.io/lingo-db/lingodb-dev:latest
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: debug-build
path: build/lingodb-debug
- name: Test
run: |
make venv
touch build/dependencies
touch build/lingodb-debug/.stamp
touch build/lingodb-debug/.buildstamp
chmod +x build/lingodb-release/*
make test-no-rebuild
sqlite_tests:
needs: build_release
runs-on: ubuntu-latest
container: ghcr.io/lingo-db/lingodb-dev:latest
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: release-build
path: build/lingodb-release
- name: Test
run: |
make venv
touch build/dependencies
touch build/lingodb-release/.stamp
touch build/lingodb-release/.buildstamp
chmod +x build/lingodb-release/*
make sqlite-test-no-rebuild
build_lingodb_python:
runs-on: ubuntu-latest
container: ghcr.io/lingo-db/lingodb-py-dev:latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
rm -rf /built-packages
mkdir -p /built-packages
bash tools/python/bridge/create_package.sh cp310-cp310
cd tools/python
/opt/python/cp310-cp310/bin/python3 -m build .
cp dist/*.whl /built-packages/.
- uses: actions/upload-artifact@master
with:
name: lingodb-python-build
path: /built-packages
test_lingodb_python:
needs: build_lingodb_python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: lingodb-python-build
path: built-packages
- name: Test
run: |
pip install built-packages/*.whl
pip install pandas
python3 tools/python/test/test.py
coverage:
runs-on: ubuntu-latest
container: ghcr.io/lingo-db/lingodb-dev:latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
make clean
make venv
make test-coverage
- uses: actions/checkout@master
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/lingodb-debug-coverage/filtered-coverage.info