Skip to content

Commit

Permalink
Merge pull request #4 from rib/aa-release-0.4.2
Browse files Browse the repository at this point in the history
Update all of the examples
  • Loading branch information
rib authored Jun 25, 2023
2 parents 41e72ca + 3740ac3 commit 3ad2b59
Showing 212 changed files with 8,193 additions and 4,131 deletions.
119 changes: 89 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -2,23 +2,22 @@ name: ci

on:
push:
branches: [main]
pull_request:

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 --deny warnings"
RUSTDOCFLAGS: -Dwarnings

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust_version: [stable]
cargo_ndk_args: [-t arm64-v8a -t armeabi-v7a -t x86_64 -t x86 -o app/src/main/jniLibs/]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: hecrj/setup-rust-action@v1
with:
@@ -49,50 +48,110 @@ jobs:
# a shared target to speed up builds of all examples
run: mkdir shared-target

- name: Build na-mainloop example
working-directory: na-mainloop
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build agdk-mainloop example
working-directory: agdk-mainloop
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk
-t arm64-v8a
-t armeabi-v7a
-t x86_64
-t x86
-o app/src/main/jniLibs/ -- build
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build na-mainloop example
working-directory: na-mainloop
- name: Build na-subclass-jni
working-directory: na-subclass-jni
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build na-winit-wgpu
working-directory: na-winit-wgpu
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build na-winit-glutin
working-directory: na-winit-glutin
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build agdk-winit-glutin
working-directory: na-winit-glutin
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build agdk-cpal
working-directory: agdk-cpal
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk
-t arm64-v8a
-t armeabi-v7a
-t x86_64
-t x86
-o app/src/main/jniLibs/ -- build
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build agdk-oboe
working-directory: agdk-oboe
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build na-egui example
working-directory: na-egui
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build agdk-egui example
working-directory: agdk-egui
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk
-t arm64-v8a
-t armeabi-v7a
-t x86_64
-t x86
-o app/src/main/jniLibs/ -- build
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
- name: Build agdk-eframe example
working-directory: agdk-eframe
run: >
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk
-t arm64-v8a
-t armeabi-v7a
-t x86_64
-t x86
-o app/src/main/jniLibs/ -- build
CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
./gradlew build &&
find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;
# We don't currently build the OpenXR examples on Android because I
# haven't found a nice nice way to pull in libopenxr_loader binaries that
# we can link against. Normally I would use the binaries as part of the
# Oculus SDK
#
# TODO: maybe we can look at using the 'prefab' `.aar`s from Khronos here:
# https://search.maven.org/artifact/org.khronos.openxr/openxr_loader_for_android
#
#- name: Build na-openxr-info example
# working-directory: na-openxr-info
# run: >
# CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build --features=android &&
# ./gradlew build &&
# find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;

#- name: Build na-openxr-wgpu
# working-directory: na-openxr-wgpu
# run: >
# CARGO_TARGET_DIR=$GITHUB_WORKSPACE/shared-target cargo ndk ${{ matrix.cargo_ndk_args }} build &&
# ./gradlew build &&
# find $GITHUB_WORKSPACE/shared-target -iname '*.so' -exec rm {} \;


format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
7 changes: 1 addition & 6 deletions agdk-cpal/.gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/.idea
.DS_Store
/build
/captures
3 changes: 0 additions & 3 deletions agdk-cpal/.idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions agdk-cpal/.idea/compiler.xml

This file was deleted.

20 changes: 0 additions & 20 deletions agdk-cpal/.idea/gradle.xml

This file was deleted.

9 changes: 0 additions & 9 deletions agdk-cpal/.idea/misc.xml

This file was deleted.

7 changes: 0 additions & 7 deletions agdk-cpal/.idea/vcs.xml

This file was deleted.

Loading

0 comments on commit 3ad2b59

Please sign in to comment.