Skip to content

Commit

Permalink
Cordova (#16)
Browse files Browse the repository at this point in the history
* Add empty cordova project

* Add android platform to Cordova

* Add cordova-build

* Rename rust.yml to build.yml

* Add Git to cordova build

* Add Cordova platform add android.

* Upload Cordova Android build as artifact.

* Update Cordova package.json with initial relevant information.
  • Loading branch information
philipborg authored Feb 6, 2022
1 parent 1f8758e commit 3a5f49c
Show file tree
Hide file tree
Showing 6 changed files with 1,772 additions and 4 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/rust.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
SOURCE_PATH: "./src"

jobs:
build:
rust-build:
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -120,3 +120,31 @@ jobs:
name: CubeShuffle-wasm_${{ matrix.platform }}
if-no-files-found: error
path: "${{ github.workspace }}/wasm_build"

cordova-build:
container:
image: beevelop/cordova:latest
runs-on: ubuntu-latest
needs: [rust-build]
steps:
- name: Install Git
run: apt-get -y update && apt-get -y install git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
path: ${{ env.SOURCE_PATH }}
- name: Download compiled WASM
uses: actions/download-artifact@v2
with:
name: CubeShuffle-wasm_ubuntu-latest
path: "${{ env.SOURCE_PATH }}/cube_shuffle-cordova/www"
- name: Build Android
working-directory: "${{ env.SOURCE_PATH }}/cube_shuffle-cordova"
run: |
cordova platform add android --no-telemetry --verbose
cordova build android --device --release --no-telemetry --verbose
- uses: actions/upload-artifact@v2
with:
name: CubeShuffle-Cordova-Android
if-no-files-found: error
path: "${{ env.SOURCE_PATH }}/cube_shuffle-cordova/platforms/android/app/build/outputs/bundle/release/app-release.aab"
27 changes: 27 additions & 0 deletions cube_shuffle-cordova/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

.DS_Store

# Generated by package manager
node_modules/

# Generated by Cordova
/plugins/
/platforms/
/www
11 changes: 11 additions & 0 deletions cube_shuffle-cordova/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
<description>Sample Apache Cordova App</description>
<author email="dev@cordova.apache.org" href="https://cordova.apache.org">
Apache Cordova Team
</author>
<content src="index.html" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
</widget>
Loading

0 comments on commit 3a5f49c

Please sign in to comment.