Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ on:
pull_request:
branches:
- master
inputs:
windows-sdk-version:
description: 'Windows SDK Version'
required: true
type: string
default: 10.0.20348.0

env:
BRN_Version: 0.64

Expand Down Expand Up @@ -143,12 +150,14 @@ jobs:
with:
react-native-version: 0.65
release-version: 0.0.${GITHUB_SHA::8}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-windows-069:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.69
release-version: 0.0.${GITHUB_SHA::8}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-typescript:
uses: ./.github/workflows/typescript.yml
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Publish Package
on:
release:
types: [published]
inputs:
windows-sdk-version:
description: 'Windows SDK Version'
required: true
type: string
default: 10.0.20348.0

jobs:
build-android-ios-064:
Expand All @@ -27,18 +33,21 @@ jobs:
with:
react-native-version: 0.64
release-version: ${GITHUB_REF/refs\/tags\//}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-windows-065:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.65
release-version: ${GITHUB_REF/refs\/tags\//}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-windows-069:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.69
release-version: ${GITHUB_REF/refs\/tags\//}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-typescript:
uses: ./.github/workflows/typescript.yml
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/publish_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
required: true
type: string
default: preview
windows-sdk-version:
description: 'Windows SDK Version'
required: true
type: string
default: 10.0.20348.0

jobs:
build-android-ios-064:
Expand All @@ -37,18 +42,21 @@ jobs:
with:
react-native-version: 0.64
release-version: ${{ github.event.inputs.release_version }}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-windows-065:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.65
release-version: ${{ github.event.inputs.release_version }}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-windows-069:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.69
release-version: ${{ github.event.inputs.release_version }}
windows-sdk-version: ${{ github.event.inputs.windows-sdk-version }}

build-typescript:
uses: ./.github/workflows/typescript.yml
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
release-version:
required: true
type: string
windows-sdk-version:
required: true
type: string

jobs:
Build:
Expand Down Expand Up @@ -37,7 +40,7 @@ jobs:
run: npx gulp initializeSubmodulesWindowsAgent --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ inputs.release-version }}
working-directory: ./Package
- name: Gulp (Windows)
run: npx gulp buildUWPPublish
run: npx gulp buildUWPPublish -WindowsSDKVersion ${{ inputs.windows-sdk-version }}
working-directory: ./Package
- name: Upload Assembled-Windows Folder
uses: actions/upload-artifact@v2
Expand Down
12 changes: 11 additions & 1 deletion Package/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,17 @@ const initializeSubmodulesMostRecentBabylonNative = async () => {

const makeUWPProjectPlatform = async (name, arch) => {
shelljs.mkdir('-p', `./../Modules/@babylonjs/react-native/Build/uwp_${name}`);
exec(`cmake -D CMAKE_SYSTEM_NAME=WindowsStore -D CMAKE_SYSTEM_VERSION=10.0 -DCMAKE_UNITY_BUILD=true -A ${arch} ./../../../react-native-windows/windows`, `./../Modules/@babylonjs/react-native/Build/uwp_${name}`);

let WindowsSDKVersionCMakeString = "";
const [WindowsSDKVersionFlag] = process.argv.slice(3);
if (WindowsSDKVersionFlag === '-WindowsSDKVersion') {
const [WindowsSDKVersionValue] = process.argv.slice(4);
if (WindowsSDKVersionValue)
{
WindowsSDKVersionCMakeString = `-DCMAKE_SYSTEM_VERSION=${WindowsSDKVersionValue}`;
}
}
Comment on lines +128 to +136
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to put this logic in tools.js (which I just noticed we have duplicated between RN versions 😬) and invoked via an npm script in package.json? This would be more like what we do for iOS, which makes it really easy to do locally in an isolated way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. tools.js is used to build the PG. and gulp.js is used to build packages. moreover, you can test this change locally with npx gulp buildUWPPublish -WindowsSDKVersion 10.0....

exec(`cmake -D CMAKE_SYSTEM_NAME=WindowsStore -D CMAKE_SYSTEM_VERSION=10.0 -DCMAKE_UNITY_BUILD=true -A ${arch} ./../../../react-native-windows/windows ${WindowsSDKVersionCMakeString}`, `./../Modules/@babylonjs/react-native/Build/uwp_${name}`);
};

const makeUWPProjectx86 = async () => makeUWPProjectPlatform('x86', 'Win32');
Expand Down