From 33b0713e3d555cd5c7eaa608d61a3ebb59a0e39b Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Fri, 10 May 2024 10:13:12 -0700 Subject: [PATCH 1/9] add matching .yml files to gallery --- azure-pipelines.yml | 63 ++++++++++++++++++++++++++++++ ci.yml | 95 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 azure-pipelines.yml create mode 100644 ci.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..a4bef71 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,63 @@ +pr: + - main + - 'v*' + +variables: + BuildLogDirectory: $(Build.BinariesDirectory)\x64\BuildLogs + +pool: + name: rnw-pool-4 + demands: ImageOverride -equals rnw-img-vs2022 + +steps: + - checkout: self + clean: false + + - task: NuGetToolInstaller@0 + inputs: + versionSpec: '>=5.8.0' + + - task: NodeTool@0 + displayName: Installing Node + inputs: + versionSpec: '18.x' + + - task: CmdLine@2 + displayName: Installing Yarm + inputs: + script: npm install -g yarn + + - task: NuGetCommand@2 + displayName: NuGet restore + inputs: + command: restore + restoreSolution: windows/artificialChat.sln + verbosityRestore: Detailed + + - task: CmdLine@2 + displayName: midgard-yarn (faster yarn install) + inputs: + script: npx midgard-yarn@1.23.14 --pure-lockfile + + - task: CmdLine@2 + displayName: Lint and Type Checks + inputs: + script: yarn tsc | yarn lint + + - task: CmdLine@2 + displayName: Build project (Debug) + timeoutInMinutes: 60 + inputs: + script: npx react-native run-windows --arch x64 --no-deploy --logging --buildLogDirectory $BuildLogDirectory\Debug + + - task: CmdLine@2 + displayName: Snapshot Tests + inputs: + script: yarn test + + - task: PublishBuildArtifacts@1 + displayName: Upload build logs + condition: succeededOrFailed() + inputs: + pathtoPublish: $BuildLogDirectory + artifactName: 'Build logs - $(Agent.JobName)-$(System.JobAttempt)' \ No newline at end of file diff --git a/ci.yml b/ci.yml new file mode 100644 index 0000000..8beb428 --- /dev/null +++ b/ci.yml @@ -0,0 +1,95 @@ +strategy: + matrix: + canary: + UPGRADE: true + PUBLISH_APP: false + VERSION_NAME: artificialChat@canary + latest: + UPGRADE: true + PUBLISH_APP: false + VERSION_NAME: artificialChat@latest + preview: + UPGRADE: true + PUBLISH_APP: false + VERSION_NAME: artificialChat@preview + +variables: + - group: artificialChat_Variables + - name: BuildLogDirectory + value: $(Build.BinariesDirectory)\x64\BuildLogs + +pool: + name: rnw-pool-4 + demands: ImageOverride -equals rnw-img-vs2022 + +steps: + - checkout: self + clean: false + + - task: NuGetToolInstaller@0 + inputs: + versionSpec: '>=5.8.0' + + - task: NodeTool@0 + displayName: Installing Node + inputs: + versionSpec: '18.x' + + - task: CmdLine@2 + displayName: Upgrade react-native-windows Version + condition: eq(variables['UPGRADE'], 'true') + inputs: + script: node scripts/use-upgrade-version.js --upgradeVersion $(VERSION_NAME) + + - task: CmdLine@2 + displayName: Installing Yarn + inputs: + script: npm install -g yarn + + - task: NuGetCommand@2 + displayName: NuGet restore + inputs: + command: restore + restoreSolution: windows/artificialChat.sln + verbosityRestore: Detailed + + - task: CmdLine@2 + displayName: midgard-yarn (faster yarn install) + inputs: + script: npx midgard-yarn@1.23.14 --pure-lockfile + + - task: CmdLine@2 + displayName: Lint and Type Checks + inputs: + script: yarn tsc | yarn lint + + - task: DownloadSecureFile@1 + name: signingCert + displayName: 'Download CA certificate' + inputs: + secureFile: 'artificialChat_Key.pfx' + + - task: CopyFiles@2 + displayName: 'Copy Certificate to Windows Build Directory' + inputs: + SourceFolder: '$(signingCert.secureFilePath)' + Contents: 'artificialChat_Key.pfx' + TargetFolder: '.\windows\artificialChat\' + + - task: CmdLine@2 + displayName: Build project (Release) + timeoutInMinutes: 60 + inputs: + script: npx --no-install react-native run-windows --arch x64 --no-deploy --logging --buildLogDirectory $BuildLogDirectory\Release --msbuildprops PackageCertificateKeyFile=$(signingCert.secureFilePath) --release + + - task: CmdLine@2 + displayName: Remove the Pfx + inputs: + script: del /f .\windows\artificialChat\artificialChat_Key.pfx + + - task: PublishBuildArtifacts@1 + displayName: Upload App + condition: and(succeededOrFailed(), eq(${{ matrix.reactNativeWindowsVersion }}, "current")) + inputs: + pathtoPublish: .\windows\AppPackages\artificialChat + artifactName: 'artificialChat - $(Agent.JobName)-$(System.JobAttempt)' \ No newline at end of file From 5753e8cf9995ac309aff972c6528c8fcef87fd7b Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Wed, 22 May 2024 13:09:22 -0700 Subject: [PATCH 2/9] switch to github actions --- .github/workflows/pr.yml | 42 ++++++++++++++++++ azure-pipelines.yml | 63 -------------------------- ci.yml | 95 ---------------------------------------- 3 files changed, 42 insertions(+), 158 deletions(-) create mode 100644 .github/workflows/pr.yml delete mode 100644 azure-pipelines.yml delete mode 100644 ci.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..cef3953 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,42 @@ +name: Windows CI +on: [pull_request] + +jobs: + run-windows-tests: + name: Build & run tests + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v2 + name: Checkout Code + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: '^18' + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Check node modules cache + uses: actions/cache@v1 + id: yarn-cache + with: + path: ./node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install node modules + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn --pure-lockfile + + - name: yarn build + if: steps.yarn-cache.outputs.cache-hit == 'true' + run: | + yarn build + yarn tsc + + - name: Build x64 release + shell: powershell + run: npx react-native run-windows --root example --arch x64 --release --no-packager --no-deploy --logging \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index a4bef71..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,63 +0,0 @@ -pr: - - main - - 'v*' - -variables: - BuildLogDirectory: $(Build.BinariesDirectory)\x64\BuildLogs - -pool: - name: rnw-pool-4 - demands: ImageOverride -equals rnw-img-vs2022 - -steps: - - checkout: self - clean: false - - - task: NuGetToolInstaller@0 - inputs: - versionSpec: '>=5.8.0' - - - task: NodeTool@0 - displayName: Installing Node - inputs: - versionSpec: '18.x' - - - task: CmdLine@2 - displayName: Installing Yarm - inputs: - script: npm install -g yarn - - - task: NuGetCommand@2 - displayName: NuGet restore - inputs: - command: restore - restoreSolution: windows/artificialChat.sln - verbosityRestore: Detailed - - - task: CmdLine@2 - displayName: midgard-yarn (faster yarn install) - inputs: - script: npx midgard-yarn@1.23.14 --pure-lockfile - - - task: CmdLine@2 - displayName: Lint and Type Checks - inputs: - script: yarn tsc | yarn lint - - - task: CmdLine@2 - displayName: Build project (Debug) - timeoutInMinutes: 60 - inputs: - script: npx react-native run-windows --arch x64 --no-deploy --logging --buildLogDirectory $BuildLogDirectory\Debug - - - task: CmdLine@2 - displayName: Snapshot Tests - inputs: - script: yarn test - - - task: PublishBuildArtifacts@1 - displayName: Upload build logs - condition: succeededOrFailed() - inputs: - pathtoPublish: $BuildLogDirectory - artifactName: 'Build logs - $(Agent.JobName)-$(System.JobAttempt)' \ No newline at end of file diff --git a/ci.yml b/ci.yml deleted file mode 100644 index 8beb428..0000000 --- a/ci.yml +++ /dev/null @@ -1,95 +0,0 @@ -strategy: - matrix: - canary: - UPGRADE: true - PUBLISH_APP: false - VERSION_NAME: artificialChat@canary - latest: - UPGRADE: true - PUBLISH_APP: false - VERSION_NAME: artificialChat@latest - preview: - UPGRADE: true - PUBLISH_APP: false - VERSION_NAME: artificialChat@preview - -variables: - - group: artificialChat_Variables - - name: BuildLogDirectory - value: $(Build.BinariesDirectory)\x64\BuildLogs - -pool: - name: rnw-pool-4 - demands: ImageOverride -equals rnw-img-vs2022 - -steps: - - checkout: self - clean: false - - - task: NuGetToolInstaller@0 - inputs: - versionSpec: '>=5.8.0' - - - task: NodeTool@0 - displayName: Installing Node - inputs: - versionSpec: '18.x' - - - task: CmdLine@2 - displayName: Upgrade react-native-windows Version - condition: eq(variables['UPGRADE'], 'true') - inputs: - script: node scripts/use-upgrade-version.js --upgradeVersion $(VERSION_NAME) - - - task: CmdLine@2 - displayName: Installing Yarn - inputs: - script: npm install -g yarn - - - task: NuGetCommand@2 - displayName: NuGet restore - inputs: - command: restore - restoreSolution: windows/artificialChat.sln - verbosityRestore: Detailed - - - task: CmdLine@2 - displayName: midgard-yarn (faster yarn install) - inputs: - script: npx midgard-yarn@1.23.14 --pure-lockfile - - - task: CmdLine@2 - displayName: Lint and Type Checks - inputs: - script: yarn tsc | yarn lint - - - task: DownloadSecureFile@1 - name: signingCert - displayName: 'Download CA certificate' - inputs: - secureFile: 'artificialChat_Key.pfx' - - - task: CopyFiles@2 - displayName: 'Copy Certificate to Windows Build Directory' - inputs: - SourceFolder: '$(signingCert.secureFilePath)' - Contents: 'artificialChat_Key.pfx' - TargetFolder: '.\windows\artificialChat\' - - - task: CmdLine@2 - displayName: Build project (Release) - timeoutInMinutes: 60 - inputs: - script: npx --no-install react-native run-windows --arch x64 --no-deploy --logging --buildLogDirectory $BuildLogDirectory\Release --msbuildprops PackageCertificateKeyFile=$(signingCert.secureFilePath) --release - - - task: CmdLine@2 - displayName: Remove the Pfx - inputs: - script: del /f .\windows\artificialChat\artificialChat_Key.pfx - - - task: PublishBuildArtifacts@1 - displayName: Upload App - condition: and(succeededOrFailed(), eq(${{ matrix.reactNativeWindowsVersion }}, "current")) - inputs: - pathtoPublish: .\windows\AppPackages\artificialChat - artifactName: 'artificialChat - $(Agent.JobName)-$(System.JobAttempt)' \ No newline at end of file From ae92d56887308298e6c0f7309ef8d72dac2fb804 Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Thu, 23 May 2024 11:33:24 -0700 Subject: [PATCH 3/9] add vs version --- .github/workflows/pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cef3953..668647c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -17,6 +17,8 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.0.2 + with: + vs-version: 17.9.7 - name: Check node modules cache uses: actions/cache@v1 From 7ad2dc242dd00c4d9fd8e84d955a4e2049a69472 Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Thu, 23 May 2024 14:23:48 -0700 Subject: [PATCH 4/9] try to fix vs version --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 668647c..53ec6a8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -16,9 +16,9 @@ jobs: node-version: '^18' - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v2 with: - vs-version: 17.9.7 + vs-version: '17.x' - name: Check node modules cache uses: actions/cache@v1 From e19f5ca9733a38d765f67978402bc84952a332f6 Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Thu, 23 May 2024 16:05:11 -0700 Subject: [PATCH 5/9] fix CI --- .github/workflows/pr.yml | 53 +++++++++++++++------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 53ec6a8..7f5d903 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,44 +1,31 @@ name: Windows CI -on: [pull_request] +on: + pull_request: + branches: [ main ] jobs: run-windows-tests: name: Build & run tests - runs-on: windows-2019 + runs-on: windows-2022 + strategy: + matrix: + configuration: ['Debug', 'Release'] + platform: ['x86', 'x64'] steps: - - uses: actions/checkout@v2 - name: Checkout Code - - - name: Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: '^18' + - uses: actions/checkout@v2 + name: Checkout Code - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v2 - with: - vs-version: '17.x' + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: '^18' - - name: Check node modules cache - uses: actions/cache@v1 - id: yarn-cache - with: - path: ./node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 - - name: Install node modules - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn --pure-lockfile - - - name: yarn build - if: steps.yarn-cache.outputs.cache-hit == 'true' - run: | - yarn build - yarn tsc + - name: Install node modules + run: yarn --frozen-lockfile - - name: Build x64 release - shell: powershell - run: npx react-native run-windows --root example --arch x64 --release --no-packager --no-deploy --logging \ No newline at end of file + - name: Run Windows ${{ matrix.platform }} ${{ matrix.configuration }} + run: npx react-native run-windows --arch ${{ matrix.platform }} --${{ matrix.configuration }} --logging --no-packager --no-deploy \ No newline at end of file From 1a81781afb9a6ed73a0cca1dfa8556321a0a2f0d Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Thu, 23 May 2024 16:15:04 -0700 Subject: [PATCH 6/9] fix matrix --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7f5d903..6d8e306 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,7 +9,7 @@ jobs: runs-on: windows-2022 strategy: matrix: - configuration: ['Debug', 'Release'] + configuration: ['debug', 'release'] platform: ['x86', 'x64'] steps: @@ -28,4 +28,4 @@ jobs: run: yarn --frozen-lockfile - name: Run Windows ${{ matrix.platform }} ${{ matrix.configuration }} - run: npx react-native run-windows --arch ${{ matrix.platform }} --${{ matrix.configuration }} --logging --no-packager --no-deploy \ No newline at end of file + run: npx react-native run-windows --arch ${{ matrix.platform }} ${{ matrix.configuration == 'release' && '--release' || '' }} --logging --no-packager --no-deploy \ No newline at end of file From a6a46e578c64a7b21865ff49f180a1e126bc685b Mon Sep 17 00:00:00 2001 From: Tatiana Kapos Date: Mon, 24 Jun 2024 15:24:23 -0700 Subject: [PATCH 7/9] Update .github/workflows/pr.yml Co-authored-by: Chris Glein <26607885+chrisglein@users.noreply.github.com> --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6d8e306..488ec36 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,8 +13,8 @@ jobs: platform: ['x86', 'x64'] steps: - - uses: actions/checkout@v2 - name: Checkout Code + - name: Checkout Code + uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v1 From 4c2c2ac8eafb780735cacff6755c1d8ec8efa4fc Mon Sep 17 00:00:00 2001 From: Marlene Cota <1422161+marlenecota@users.noreply.github.com> Date: Fri, 28 Jun 2024 10:32:39 -0700 Subject: [PATCH 8/9] svg patch --- patches/react-native-svg+15.3.0.patch | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/patches/react-native-svg+15.3.0.patch b/patches/react-native-svg+15.3.0.patch index 48cc60e..10320a9 100644 --- a/patches/react-native-svg+15.3.0.patch +++ b/patches/react-native-svg+15.3.0.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj b/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj -index b682596..4f52dcf 100644 +index b682596..b4ce847 100644 --- a/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj +++ b/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj @@ -26,12 +26,10 @@ @@ -16,3 +16,21 @@ index b682596..4f52dcf 100644 10.0.16299.0 +@@ -115,7 +113,7 @@ + _DEBUG;%(PreprocessorDefinitions) + + +- dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) ++ d2d1.lib;dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) + + + +@@ -123,7 +121,7 @@ + NDEBUG;%(PreprocessorDefinitions) + + +- dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) ++ d2d1.lib;dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) + + + From 43f7dcfb39c50649377c66370e4f9354b0fe3405 Mon Sep 17 00:00:00 2001 From: Marlene Cota <1422161+marlenecota@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:08:16 -0700 Subject: [PATCH 9/9] svg patch v2 --- patches/react-native-svg+15.3.0.patch | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/patches/react-native-svg+15.3.0.patch b/patches/react-native-svg+15.3.0.patch index 10320a9..116edd1 100644 --- a/patches/react-native-svg+15.3.0.patch +++ b/patches/react-native-svg+15.3.0.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj b/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj -index b682596..b4ce847 100644 +index b682596..1909e58 100644 --- a/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj +++ b/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj @@ -26,12 +26,10 @@ @@ -16,21 +16,29 @@ index b682596..b4ce847 100644 10.0.16299.0 -@@ -115,7 +113,7 @@ - _DEBUG;%(PreprocessorDefinitions) +@@ -105,6 +103,7 @@ + $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) ++ dxguid.lib;windowsapp.lib;%(AdditionalDependenices) + Console + true + RNSVG.def +@@ -114,17 +113,11 @@ + + _DEBUG;%(PreprocessorDefinitions) + +- - dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) -+ d2d1.lib;dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) - +- -@@ -123,7 +121,7 @@ + NDEBUG;%(PreprocessorDefinitions) - +- - dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) -+ d2d1.lib;dxguid.lib;WindowsApp.lib;%(AdditionalDependencies) - +- +