Change build action to run on pull requests (#251)
This commit is contained in:
65
.github/workflows/build.yml
vendored
65
.github/workflows/build.yml
vendored
@@ -1,40 +1,53 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# Trigger the workflow on any pull request
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./orx
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- name: Checkout current repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
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
|
||||
- uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
path: orx
|
||||
|
||||
- name: Test glxinfo
|
||||
run: |
|
||||
sudo apt-get install -y mesa-utils xvfb
|
||||
xvfb-run glxinfo
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '16'
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
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 OPENRNDR snapshot
|
||||
run: |
|
||||
cd ./openrndr
|
||||
./gradlew publishToMavenLocal -Prelease.version=0.5.1-SNAPSHOT
|
||||
cd ..
|
||||
- name: Build ORX
|
||||
run: |
|
||||
cd ./orx
|
||||
./gradlew build
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Collect screenshots without errors
|
||||
run: xvfb-run ./gradlew collectScreenshots
|
||||
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
|
||||
@@ -4,17 +4,18 @@ on:
|
||||
tags:
|
||||
- v[0-9].[0-9]+.[0-9]+-rc.[0-9]+
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
release_candidate_to_maven_central:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get OPENRNDR release tag
|
||||
run: echo "OPENRNDR_VERSION=$(git ls-remote --refs --tags https://github.com/openrndr/openrndr | cut --delimiter='/' --fields=3 | sort --version-sort | tail --lines=1)" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
|
||||
- uses: actions/setup-java@v1
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- name: Build ORX
|
||||
env:
|
||||
|
||||
@@ -5,17 +5,18 @@ on:
|
||||
- v[0-9].[0-9]+.[0-9]+
|
||||
- v[0-9].[0-9]+.[0-9]+-[0-9]+
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
release_to_maven_central:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get OPENRNDR release tag
|
||||
run: echo "OPENRNDR_VERSION=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/openrndr/openrndr | cut --delimiter='/' --fields=3 | tail --lines=1)" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
|
||||
- uses: actions/setup-java@v1
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- name: Build ORX
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user