Skip to content

Commit

Permalink
Merge branch 'main' into feature/model-import
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Jul 15, 2024
2 parents f7ae801 + c97f39e commit 973d9d9
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 61 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
b5c9a69a0cc4f18d10f261e17d2a0eba49177ea1
16d7589e89d835ed98f56228748dff86e6e46b84
886f900ed7390e22ac6c8698eae06ad21d294309
138 changes: 135 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,15 @@ jobs:
- name: Save Library/PackageCache cache
uses: actions/cache/save@v4
if: github.ref == 'refs/heads/main' && steps.check_packagecache.outputs.changes == 0 && steps.cache_packagecache.outputs.cache-hit != 'true' && ! matrix.packages_to_remove # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
if: steps.check_packagecache.outputs.changes == 0 && steps.cache_packagecache.outputs.cache-hit != 'true' && ! matrix.packages_to_remove
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10
with:
path: Library/PackageCache
key: Library_PackageCache_${{ env.UNITY_VERSION }}_${{ hashFiles('Packages/packages-lock.json') }}

- name: Clean Library before caching
if: github.ref == 'refs/heads/main' && steps.cache_library.outputs.cache-hit != 'true' # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
if: steps.cache_library.outputs.cache-hit != 'true'
run: |
# Remove the large files from the Library directory that we know we'll rebuild. As our il2cpp caches are huge and barely fit in the Github quota, it's better not to save an unneeded 1GB of space (or so). If a new Unity version is taken, this may need to be updated
# Debugging
Expand All @@ -398,7 +398,7 @@ jobs:
- name: Save Library/ cache
uses: actions/cache/save@v4
if: github.ref == 'refs/heads/main' && steps.cache_library.outputs.cache-hit != 'true' # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
if: steps.cache_library.outputs.cache-hit != 'true'
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10
with:
Expand Down Expand Up @@ -483,3 +483,135 @@ jobs:
target_commitish: ${{ needs.configuration.outputs.currentrelease }}
tag_name: ${{ needs.configuration.outputs.version }}
files: releases/*

publish_gitbook:
name: Publish changelog from last major build to open-blocks-docs
needs: [configuration, build]
runs-on: ubuntu-latest
if: |
github.event_name == 'push' &&
github.repository == 'icosa-foundation/open-blocks' &&
(github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v'))
steps:
- name: "Build Changelog"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
fromTag: "${{ needs.configuration.outputs.previousfullrelease }}"
toTag: "${{ needs.configuration.outputs.currentrelease }}"
configurationJson: |
{
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feature", "enhancement"]
},
{
"title": "## 🎨 UI / UX",
"labels": ["ux"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix", "bugfix"]
},
{
"title": "## 🛠️ Infrastructure",
"labels": ["infrastructure"]
},
{
"title": "## 📦 Dependencies / Maintenance",
"labels": ["dependencies", "maintenance"]
},
{
"title": "## 💬 Uncategorized",
"labels": []
}
],
"template": "# Changelog since #{{FROM_TAG}}\n\n[Full release details](#{{RELEASE_DIFF}})\n\n#{{CHANGELOG}}\n\n",
"pr_template": "- #{{TITLE}} ([PR ##{{NUMBER}}](#{{URL}}) by @#{{AUTHOR}})\n"
}
- name: Get the current contents of the docs repository
uses: actions/checkout@v4
with:
repository: icosa-foundation/open-blocks-docs
path: open-blocks-docs
ref: main
fetch-depth: 0
sparse-checkout: |
release-history/
- name: Create Changelog file
env:
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
run: |
echo "$CHANGELOG" | tee open-blocks-docs/release-history/automatic-changelog.md
- name: Publish release notes
uses: cpina/[email protected]
env:
SSH_DEPLOY_KEY: ${{ secrets.OPENBLOCKS_DOCS_SSH_DEPLOY_KEY }}
with:
source-directory: 'open-blocks-docs/release-history/'
target-directory: 'release-history/'
destination-github-username: 'icosa-foundation'
destination-repository-name: 'open-blocks-docs'
user-name: 'release-note-bot'
user-email: automatic-release@icosa
target-branch: main

publish_steam:
name: Publish Steam Release
needs: [configuration, build]
if: |
github.event_name == 'push' &&
github.repository == 'icosa-foundation/open-blocks' &&
(github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
Support/steam
lfs: true # We don't use LFS, but it adds no time, and leave it here in case we do at some point later
- name: Setup steamcmd
uses: CyberAndrii/[email protected]
- name: Restore steam login config
run: |
mkdir -p /home/runner/Steam/config
echo "${{ secrets.STEAM_CONFIG_VDF}}" | base64 -d - > /home/runner/Steam/config/config.vdf
md5sum /home/runner/Steam/config/config.vdf
- name: Download Build Artifacts (Windows)
uses: actions/download-artifact@v4
with:
name: Windows
path: build_windows
- name: Upload Build
run: |
pip install -U jinjanator
jinjanate Support/steam/app.vdf.j2 > app.vdf
jinjanate Support/steam/main_depot.win.vdf.j2 > build_windows/main_depot.vdf
#jinjanate Support/steam/installscript_win.vdf.j2 > build_windows_openxr/installscript_win.vdf
steamcmd +login $STEAM_USERNAME +run_app_build $(pwd)/app.vdf +quit
env:
STEAM_USERNAME: ${{ vars.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
VERSION: ${{ needs.configuration.outputs.version }}
OPEN_BLOCKS_APP_ID: ${{ vars.STEAM_APP_ID }}
OPEN_BLOCKS_WINDOWS_DEPOT_ID: ${{ vars.STEAM_WINDOWS_DEPOT_ID }}
OPEN_BLOCKS_WINDOWS_EXECUTABLE: ${{ needs.configuration.outputs.basename}}.exe
CHANNEL: beta
- name: Update steam login secret
run: |
base64 -i /home/runner/Steam/config/config.vdf | gh secret set --visibility all --org icosa-foundation STEAM_CONFIG_VDF
md5sum /home/runner/Steam/config/config.vdf
env:
GITHUB_TOKEN: ${{ secrets.SECRET_UPDATER_PAT }}
- name: Save logs
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: steamcmd logs
path: build_output/
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

We encourage you to fork the repository; this repository does not currently
accept patches or contributions. See README.md for rules governing
the Blocks trademark.
the Blocks trademark. See https://github.com/googlevr/blocks/network for a
list of active forks.

Should our contribution policy ever change, contributors will need to
follow a few small guidelines.
Expand Down Expand Up @@ -30,4 +31,4 @@ information on using pull requests.
## Community Guidelines

This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
70 changes: 14 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Blocks is licensed under Apache 2.0. It is not an officially supported
Google product. See the [LICENSE](LICENSE) file for more details.

This repo is archived, but a list of active forks is available at
https://github.com/googlevr/blocks/network

## Trademarks

The Blocks trademark and logo (“Blocks Trademarks”) are trademarks of
Expand All @@ -18,10 +21,9 @@ For more information, read the

Get the Blocks open-source application running on your own devices.

### Prerequisites #TODO
### Prerequisites

* [Unity 2018.4.11f1](unityhub://2018.4.11f1/7098af2f11ea)
* [SteamVR](https://store.steampowered.com/app/250820/SteamVR/)
* [Unity 2019.4.25f1](unityhub://2019.4.25f1/01a0494af254)

The code is provided as-is. Some external dependencies were removed. It will
not build out of the box. Someone who is comfortable with Unity and SteamVR
Expand All @@ -46,60 +48,16 @@ open-source licensing issues. These are:
* AnimatedGifEncoder32
* LZWEncoder

## Google service API support

Set up Google API support to access Google services in the app.

### Enabling Google service APIs

Follow these steps when enabling Google service APIs:

1. Create a new project in the
[Google Cloud Console](https://console.developers.google.com/).
1. Enable the following APIs and services:

* **Google Drive API** — for backup to Google Drive
* **People API** — for username and profile picture

Note: The name of your application on the developer console should match the
name you've given the app in `App.kGoogleServicesAppName` in `App.cs`.

### Creating a Google API key

Follow these steps when creating a Google API key:
## Known issues

1. Go to the Credentials page from the Google Cloud Console.
1. Click **Create Credential** and select **API key** from the drop-down menu.
OculusVR mode and reference image insertion are not currently functional in this
branch.

### Google OAuth consent screen information

The OAuth consent screen asks users for permission to access their Google
account. You should be able to configure it from the Credentials screen.

Follow these steps when configuring the OAuth consent screen:

1. Fill in the name and logo of your app, as well as the scope of the user data
that the app will access.
1. Add the following paths to the list of scopes:

* Google Drive API `../auth/drive.appdata`
* Google Drive API `../auth/drive.file`

### Creating an OAuth credential

The credential identifies the application to the Google servers. Follow these
steps to create an OAuth credential:

1. Create a new credential on the Credentials screen.
1. Select **OAuth**, and then select **Other**. Take note of the client ID and
client secret values that are created for you. Keep the client secret a
secret!

### Storing the Google API Key and credential data
## Google service API support

Follow these steps to store the Google API Key and credential data: #TODO
Legacy code is included to connect to Google APIs for People and Drive
integrations. This is not critical to the Blocks experience, but is left
as a convenience for any forks that wish to make use of it with a new backend.

1. There is an asset in the `Assets/` directory called `Secrets` that contains
a `Secrets` field. Add a new item to this field.
2. Select `Google` as the service. Paste in the API key, client ID, and client
secret that were generated earlier.
You must register new projects and obtain new keys and credentials from the
Google Cloud Console to make use of these features.
14 changes: 14 additions & 0 deletions Support/steam/app.vdf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"appbuild"
{
"appid" "{{ OPEN_BLOCKS_APP_ID }}"
"Desc" "{{ VERSION }}"
"buildoutput" "build_output/{{ CHANNEL }}" // Path for steamcmd logs
"contentroot" "." // This file will be copied into the root of the release
"setlive" "{{ CHANNEL }}"
"preview" "0" // For local testing, set this to 1
"local" "" // Not relevant; this is for a custom CDN
"depots"
{
"{{ OPEN_BLOCKS_WINDOWS_DEPOT_ID }}" build_windows/main_depot.vdf
}
}
32 changes: 32 additions & 0 deletions Support/steam/main_depot.win.vdf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"DepotBuildConfig"
{
// # Set your assigned depot ID here
"DepotID" "{{ OPEN_BLOCKS_WINDOWS_DEPOT_ID }}"

"ContentRoot" "build_windows/StandaloneWindows64"

"FileMapping"
{
// Include all files in the build output directory (ContentRoot)
"LocalPath" "*"

// Destination is the main install directory
"DepotPath" "."

// If LocalPath contains wildcards, setting this means that all
// matching files within subdirectories of LocalPath will also
// be included.
"recursive" "1"
}

// Install scripts
//"FileMapping" {
// "LocalPath" "../installscript_win.vdf"
// "DepotPath" "."
//}
//"InstallScript" "../installscript_win.vdf"

// but exclude all symbol files
"FileExclusion" "*.pdb"
"FileExclusion" "build_log.txt"
}

0 comments on commit 973d9d9

Please sign in to comment.