Product Setup
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '24'
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
- run: npm ci
|
||||
working-directory: frontend
|
||||
- run: npm run build
|
||||
working-directory: frontend
|
||||
|
||||
backend:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MODULUS_DIRECT: '1'
|
||||
CONAN_HOME: build/build_common/conan_cache
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential ca-certificates cmake g++-12 gcc-12 \
|
||||
git ninja-build pkg-config python3 python3-venv
|
||||
python3 -m venv build/build_common/ci_python
|
||||
build/build_common/ci_python/bin/python -m pip install conan==2.26.2
|
||||
echo "$PWD/build/build_common/ci_python/bin" >> "$GITHUB_PATH"
|
||||
- name: Restore Conan cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build/build_common/conan_cache
|
||||
key: product_fpol_conan_${{ runner.os }}_${{ hashFiles('conanfile.py', 'modulus.json') }}
|
||||
restore-keys: product_fpol_conan_${{ runner.os }}_
|
||||
- name: Configure
|
||||
run: python3 modulus.py configure --all --update
|
||||
- name: Check formatting
|
||||
run: |
|
||||
python3 -m pip install -r build/build_tools/docker/format_requirements.txt
|
||||
python3 modulus.py format --check
|
||||
- name: Build
|
||||
run: python3 modulus.py build --all
|
||||
- name: Test
|
||||
run: python3 modulus.py test --all
|
||||
Reference in New Issue
Block a user