From 3b50d8e3129ffddc30c686c762af64c4138d877f Mon Sep 17 00:00:00 2001 From: Gary Hsu Date: Wed, 18 Jan 2023 16:25:45 -0800 Subject: [PATCH] Update CI for Win32 --- .github/ISSUE_TEMPLATE/bug_report.md | 29 +++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 22 +++++++++++++ .github/jobs/win32.yml | 38 +++++++++++++++++++++++ azure-pipelines.yml | 28 ++++++++--------- 4 files changed, 103 insertions(+), 14 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/jobs/win32.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..956a08ab --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**For questions, please use the [forum](https://forum.babylonjs.com)**. + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Other** + - Platform: [e.g. Win32, UWP, HoloLens, Android, iOS] diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..320f54da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,22 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**For questions, please use the [forum](https://forum.babylonjs.com)**. + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/jobs/win32.yml b/.github/jobs/win32.yml new file mode 100644 index 00000000..8445f0b3 --- /dev/null +++ b/.github/jobs/win32.yml @@ -0,0 +1,38 @@ +parameters: +- name: name + type: string +- name: vmImage + type: string +- name: platform + type: string + +jobs: + - job: ${{parameters.name}} + timeoutInMinutes: 5 + pool: + vmImage: ${{parameters.vmImage}} + variables: + solutionName: 'Win32_${{parameters.platform}}' + buildDir: 'Build/${{variables.solutionName}}' + + steps: + - task: Npm@1 + inputs: + command: 'install' + workingDir: 'Test' + displayName: 'Install Babylon.js NPM packages' + + - script: | + cmake -B ${{variables.buildDir}} -A ${{parameters.platform}} .. + displayName: 'Generate ${{variables.solutionName}} solution' + + - task: MSBuild@1 + inputs: + solution: '${{variables.buildDir}}/JsRuntimeHost.sln' + maximumCpuCount: true + configuration: 'RelWithDebInfo' + displayName: 'Build ${{variables.solutionName}}' + + - script: UnitTests + workingDirectory: `${{variables.buildDir}}/Tests/UnitTests/RelWithDebInfo` + displayName: 'Unit Tests' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f53e97b6..c05715d1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,19 +1,19 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - trigger: - main -pool: - vmImage: ubuntu-latest +pr: +- main -steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' +jobs: + # WIN32 + - template: .github/jobs/win32.yml + parameters: + name: Win32_x86 + vmImage: 'windows-latest' + platform: win32 -- script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' + - template: .github/jobs/win32.yml + parameters: + name: Win32_x64 + vmImage: 'windows-latest' + platform: x64