mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Simplify GH build pipeline. (#1268)
The toolchain is already bundled in the stashapp/compiler image. Rather than introducing a second one via GH actions standardize on that one instead. Also * Clear up what "Cross Compile" actually does * Still pull stashapp/compiler separately for easier debugability.
This commit is contained in:
parent
f443223d16
commit
34f114faff
1 changed files with 13 additions and 22 deletions
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
|
|
@ -8,6 +8,9 @@ on:
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [ published ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPILER_IMAGE: stashapp/compiler:4
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
@ -17,44 +20,32 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: git fetch --prune --unshallow --tags
|
run: git fetch --prune --unshallow --tags
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Pull compiler image
|
||||||
uses: actions/setup-go@v2
|
run: docker pull $COMPILER_IMAGE
|
||||||
with:
|
|
||||||
go-version: 1.13
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: '12'
|
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node_modules
|
cache-name: cache-node_modules
|
||||||
with:
|
with:
|
||||||
path: ui/v2.5/node_modules
|
path: ui/v2.5/node_modules
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ui/v2.5/yarn.lock') }}
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Pre-install
|
- name: Pre-install
|
||||||
run: make pre-ui
|
run: docker run --rm --mount type=bind,source="$(pwd)",target=/stash,consistency=delegated -w /stash $COMPILER_IMAGE /bin/bash -c "make pre-ui"
|
||||||
|
|
||||||
- name: Generate
|
- name: Generate
|
||||||
run: make generate
|
run: docker run --rm --mount type=bind,source="$(pwd)",target=/stash,consistency=delegated -w /stash $COMPILER_IMAGE /bin/bash -c "make generate"
|
||||||
|
|
||||||
|
# TODO: Replace with `make validate` once `revive` is bundled in COMPILER_IMAGE
|
||||||
- name: Validate
|
- name: Validate
|
||||||
run: make ui-validate fmt-check vet it
|
run: docker run --rm --mount type=bind,source="$(pwd)",target=/stash,consistency=delegated -w /stash $COMPILER_IMAGE /bin/bash -c "make ui-validate fmt-check vet it"
|
||||||
|
|
||||||
- name: Build UI
|
- name: Build UI
|
||||||
run: make ui-only
|
run: docker run --rm --mount type=bind,source="$(pwd)",target=/stash,consistency=delegated -w /stash $COMPILER_IMAGE /bin/bash -c "make ui-only"
|
||||||
|
|
||||||
- name: Cross Compile
|
- name: Compile for all supported platforms
|
||||||
run: |
|
run: ./scripts/cross-compile.sh
|
||||||
docker pull stashapp/compiler:4
|
|
||||||
./scripts/cross-compile.sh
|
|
||||||
|
|
||||||
- name: Generate checksums
|
- name: Generate checksums
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue