mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
* check environment * fix tests * don't rebuild sources * I'm going insane * WTF * Update check-environment.sh * Update product.yaml * Update write-image.sh
143 lines
3.6 KiB
YAML
143 lines
3.6 KiB
YAML
name: Build Pipeline
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
- next
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- next
|
|
|
|
env:
|
|
ENVIRONMENT: "dev"
|
|
|
|
jobs:
|
|
compat:
|
|
uses: ./.github/workflows/reusable-workflow.yaml
|
|
with:
|
|
build_command: make system-images/compat/docker-images/aarch64.tar
|
|
artifact_name: compat.tar
|
|
artifact_path: system-images/compat/docker-images/aarch64.tar
|
|
|
|
utils:
|
|
uses: ./.github/workflows/reusable-workflow.yaml
|
|
with:
|
|
build_command: make system-images/utils/docker-images/aarch64.tar
|
|
artifact_name: utils.tar
|
|
artifact_path: system-images/utils/docker-images/aarch64.tar
|
|
|
|
binfmt:
|
|
uses: ./.github/workflows/reusable-workflow.yaml
|
|
with:
|
|
build_command: make system-images/binfmt/docker-images/aarch64.tar
|
|
artifact_name: binfmt.tar
|
|
artifact_path: system-images/binfmt/docker-images/aarch64.tar
|
|
|
|
nc-broadcast:
|
|
uses: ./.github/workflows/reusable-workflow.yaml
|
|
with:
|
|
build_command: make cargo-deps/aarch64-unknown-linux-gnu/release/nc-broadcast
|
|
artifact_name: nc-broadcast.tar
|
|
artifact_path: cargo-deps/aarch64-unknown-linux-gnu/release/nc-broadcast
|
|
|
|
backend:
|
|
uses: ./.github/workflows/backend.yaml
|
|
|
|
frontend:
|
|
uses: ./.github/workflows/frontend.yaml
|
|
|
|
image:
|
|
name: Build image
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
needs: [compat,utils,binfmt,nc-broadcast,backend,frontend]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Download compat.tar artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: compat.tar
|
|
path: system-images/compat/docker-images/
|
|
|
|
- name: Download utils.tar artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: utils.tar
|
|
path: system-images/utils/docker-images/
|
|
|
|
- name: Download binfmt.tar artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: binfmt.tar
|
|
path: system-images/binfmt/docker-images/
|
|
|
|
- name: Download nc-broadcast.tar artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: nc-broadcast.tar
|
|
path: cargo-deps/aarch64-unknown-linux-gnu/release
|
|
|
|
- name: Download js_snapshot artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: js_snapshot
|
|
path: libs/js_engine/src/artifacts/
|
|
|
|
- name: Download arm_js_snapshot artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: arm_js_snapshot
|
|
path: libs/js_engine/src/artifacts/
|
|
|
|
- name: Download backend artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: backend-aarch64
|
|
|
|
- name: 'Extract backend'
|
|
run:
|
|
tar -mxvf backend-aarch64.tar
|
|
|
|
- name: Download frontend artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: frontend
|
|
|
|
- name: Skip frontend build
|
|
run: |
|
|
mkdir frontend/node_modules
|
|
mkdir frontend/dist
|
|
mkdir patch-db/client/node_modules
|
|
mkdir patch-db/client/dist
|
|
|
|
- name: 'Extract frontend'
|
|
run: |
|
|
tar -mxvf frontend.tar frontend/config.json
|
|
tar -mxvf frontend.tar frontend/dist
|
|
tar -xvf frontend.tar GIT_HASH.txt
|
|
tar -xvf frontend.tar ENVIRONMENT.txt
|
|
tar -xvf frontend.tar VERSION.txt
|
|
rm frontend.tar
|
|
|
|
- name: Cache raspiOS
|
|
id: cache-raspios
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: raspios.img
|
|
key: cache-raspios
|
|
|
|
- name: Build image
|
|
run: |
|
|
make V=1 embassyos-raspi.img --debug
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: image
|
|
path: embassyos-raspi.img
|