Completely refactor build system

This commit is contained in:
Ayaz Salikhov
2022-05-12 13:56:41 +03:00
parent 7abd8a6877
commit c1a91ff301
2 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
name: "Build environment"
description: "Create build environment"
on: workflow_call
runs:
steps:
- name: Maximize build space 🛠
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
# Setup docker to build for multiple platforms, see:
# https://github.com/docker/build-push-action/tree/master#usage
# https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md
- name: Set up QEMU (for docker buildx) 🐳
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # dependabot updates to latest release
# https://github.com/docker/build-push-action/tree/master#usage
- name: Set up Docker Buildx (for multi-arch builds) 🐳
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # dependabot updates to latest release
- name: Set Up Python 🐍
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Install Dev Dependencies 📦
run: |
pip install --upgrade pip
pip install -r requirements-dev.txt

61
.github/workflows/build-docker.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Build and test Docker Images
on:
schedule:
# Weekly, at 03:00 on Monday UTC time
- cron: "0 3 * * 1"
pull_request:
paths:
- ".github/workflows/build-docker.yml"
- "all-spark-notebook/**"
- "base-notebook/**"
- "datascience-notebook/**"
- "minimal-notebook/**"
- "pyspark-notebook/**"
- "r-notebook/**"
- "scipy-notebook/**"
- "tensorflow-notebook/**"
- "tagging/**"
- "tests/**"
- "requirements-dev.txt"
push:
branches:
- main
- master
paths:
- ".github/workflows/build-docker.yml"
- "all-spark-notebook/**"
- "base-notebook/**"
- "datascience-notebook/**"
- "minimal-notebook/**"
- "pyspark-notebook/**"
- "r-notebook/**"
- "scipy-notebook/**"
- "tensorflow-notebook/**"
- "tagging/**"
- "tests/**"
- "requirements-dev.txt"
workflow_dispatch:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-base-notebook:
name: Build Base Notebook Image
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
- name: Run custom action
# Use the location in the repository (without action.yml)
uses: ./.github/actions/create-dev-env