forked from openrndr/orx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change build action to run on pull requests (openrndr#251)
- Loading branch information
Showing
4 changed files
with
85 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
- name: Checkout current repository | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ./orx | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/[email protected] | ||
|
||
- name: Checkout OPENRNDR repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
repository: openrndr/openrndr | ||
path: ./openrndr | ||
ref: master | ||
- uses: actions/[email protected] | ||
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- | ||
- name: Build OPENRNDR snapshot | ||
run: | | ||
cd ./openrndr | ||
./gradlew publishToMavenLocal -Prelease.version=0.5.1-SNAPSHOT | ||
cd .. | ||
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: | | ||
cd ./orx | ||
./gradlew build | ||
run: ./gradlew build | ||
|
||
- name: Collect screenshots without errors | ||
run: xvfb-run ./gradlew collectScreenshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
#if: steps.cache_openrndr.outputs.cache-hit != 'true' | ||
path: ./orx | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/[email protected] | ||
|
||
- 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 "[email protected]" | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters