Skip to content

Commit 45a328f

Browse files
authored
Add Github Actions workflows (#4)
This commit adds Github Actions workflows for building the XR Fundamentals codelab. The workflows are defined in the following files: - .github/workflows/xr-fundamentals-part1-build-app.yml - .github/workflows/xr-fundamentals-part2-build-app.yml - .github/workflows/xr-fundamentals-start-build-app.yml These workflows will be triggered on push and pull request events to the main branch. They can also trigger manually with `workflow_dispatch`. They will build the app for each part of the codelab.
1 parent 5bf5bb0 commit 45a328f

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Workflow name
2+
name: Build XR Fundamentals Codelab - Part 1
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set Up JDK
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'zulu'
21+
java-version: '17'
22+
cache: 'gradle'
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Make gradlew executable
28+
run: chmod +x ./gradlew
29+
working-directory: ./xr-codelabs/xr-fundamentals/part1
30+
31+
- name: Build app
32+
working-directory: ./xr-codelabs/xr-fundamentals/part1
33+
run: ./gradlew :app:assembleDebug
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Workflow name
2+
name: Build XR Fundamentals Codelab - Part 2
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set Up JDK
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'zulu'
21+
java-version: '17'
22+
cache: 'gradle'
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Make gradlew executable
28+
run: chmod +x ./gradlew
29+
working-directory: ./xr-codelabs/xr-fundamentals/part2
30+
31+
- name: Build app
32+
working-directory: ./xr-codelabs/xr-fundamentals/part2
33+
run: ./gradlew :app:assembleDebug
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Workflow name
2+
name: Build XR Fundamentals Codelab - Start
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set Up JDK
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'zulu'
21+
java-version: '17'
22+
cache: 'gradle'
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Make gradlew executable
28+
run: chmod +x ./gradlew
29+
working-directory: ./xr-codelabs/xr-fundamentals/start
30+
31+
- name: Build app
32+
working-directory: ./xr-codelabs/xr-fundamentals/start
33+
run: ./gradlew :app:assembleDebug

0 commit comments

Comments
 (0)