Change build action to run on pull requests (#251)
This commit is contained in:
61
.github/workflows/generate-screenshots.yml
vendored
61
.github/workflows/generate-screenshots.yml
vendored
@@ -1,47 +1,56 @@
|
||||
name: Generate screenshots
|
||||
name: Build and generate screenshots
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
branches: [ master ]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./orx
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
generate_screenshots:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Get OPENRNDR
|
||||
- name: Get OPENRNDR HEAD ref
|
||||
run: echo "OPENRNDR_HEAD=$(git ls-remote https://github.com/openrndr/openrndr HEAD | awk '{print $1}')" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v2
|
||||
id: cache_openrndr
|
||||
- name: Checkout current repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: |
|
||||
./openrndr
|
||||
key: ${{ runner.os }}--openrndr-${{ env.OPENRNDR_HEAD }}
|
||||
- uses: actions/checkout@v2.3.4
|
||||
#if: steps.cache_openrndr.outputs.cache-hit != 'true'
|
||||
path: ./orx
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@v1.0.4
|
||||
|
||||
- name: Checkout OPENRNDR repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
repository: openrndr/openrndr
|
||||
path: ./openrndr
|
||||
ref: master
|
||||
- name: Publish OPENRNDR snapshot
|
||||
run: |
|
||||
cd ./openrndr
|
||||
./gradlew publishToMavenLocal -Prelease.version=0.5.1-SNAPSHOT
|
||||
cd ..
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
- name: Test glxinfo
|
||||
run: |
|
||||
sudo apt install -y mesa-utils xvfb
|
||||
sudo apt-get install -y mesa-utils xvfb
|
||||
xvfb-run glxinfo
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: gradle
|
||||
|
||||
- name: Build OPENRNDR
|
||||
working-directory: ./openrndr
|
||||
run: ./gradlew build -Prelease.version=0.5.1-SNAPSHOT publishToMavenLocal
|
||||
|
||||
- name: Build ORX
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Collect screenshots
|
||||
run: xvfb-run ./gradlew collectScreenshots
|
||||
|
||||
- name: Build main readme
|
||||
run: xvfb-run ./gradlew buildMainReadme
|
||||
|
||||
- name: Prepare media branch
|
||||
run: |
|
||||
git config --global user.email "actions@openrndr.org"
|
||||
@@ -57,4 +66,4 @@ jobs:
|
||||
git add [a-z-]*/images/*.png
|
||||
cd ..
|
||||
git commit -m "add auto-generated media"
|
||||
git push -f origin media
|
||||
git push -f origin media
|
||||
Reference in New Issue
Block a user