Parcourir la source

chore(ci): Cleanup windows ci (#1558)

* Cleanup windows CI

* fix

* Remove nuget setup

* Separate build and deploy

Co-authored-by: Jason Safaiyeh <safaiyeh@protonmail.com>
Kai Guo il y a 4 ans
Parent
révision
7513f198c1
No account linked to committer's email address
2 fichiers modifiés avec 7 ajouts et 11 suppressions
  1. 5
    11
      .github/workflows/windows-ci.yml
  2. 2
    0
      metro.config.windows.js

+ 5
- 11
.github/workflows/windows-ci.yml Voir le fichier

@@ -15,17 +15,10 @@ jobs:
15 15
       with:
16 16
         node-version: '12.9.1'
17 17
 
18
-    - name: Install Visual Studio components
19
-      shell: powershell
20
-      run: .\.github\workflows\scripts\install-vs-features.ps1 Microsoft.VisualStudio.Component.VC.v141.x86.x64,Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141
21
-
22 18
     - name: Setup MSBuild
23 19
       uses: microsoft/setup-msbuild@v1.0.0
24 20
       with:
25 21
         vs-version: 16.5
26
-       
27
-    - name: Setup NuGet
28
-      uses: NuGet/setup-nuget@v1.0.2
29 22
 
30 23
     - name: Check node modules cache
31 24
       uses: actions/cache@v1
@@ -45,13 +38,14 @@ jobs:
45 38
       run: |
46 39
         yarn build
47 40
         yarn tsc
48
- 
49
-    - name: NuGet restore
50
-      run: nuget restore example\windows\WebViewWindows.sln
51 41
 
52 42
     - name: Build x64 release
53
-      run: msbuild example\windows\WebViewWindows.sln /p:Configuration=Release /p:Platform=x64 -m
43
+      shell: powershell
44
+      run: npx react-native run-windows --root example --arch x64 --release --no-packager --no-deploy --logging
54 45
 
46
+    # Workaround for a bug in package searching during deploy.
47
+    # The deploy script only searches windows/{*/bin/x64/Release,Release/*}, but the build step above placed the pakcages at windows/x64/Release.
48
+    # Copy the packages to Windows/Release before deploying.
55 49
     - name: Deploy
56 50
       shell: powershell
57 51
       run: |

+ 2
- 0
metro.config.windows.js Voir le fichier

@@ -35,6 +35,8 @@ module.exports = {
35 35
       new RegExp(
36 36
         `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
37 37
       ),
38
+      // Avoid error EBUSY: resource busy or locked, open '...\vnext\msbuild.ProjectImports.zip' when building 'vnext\Microsoft.ReactNative.sln' with '/bl'
39
+      /.*\.ProjectImports\.zip/,
38 40
     ]),
39 41
   },
40 42
   transformer: {