From d5b0d29cfc6d997890cd8a958fba7fdd44df1521 Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Wed, 30 Aug 2023 21:21:51 +0200 Subject: [PATCH 1/9] Run CI on windows --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 536abad305..9f59233cd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,10 @@ jobs: build: true test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: + os: [ubuntu-latest, windows-latest] node-version: ["20.x", "18.x", "16.x"] steps: - uses: actions/checkout@v4 From 1ca6bbe495044daa2c7e831cac8cfd204bc2148a Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Wed, 30 Aug 2023 21:42:50 +0200 Subject: [PATCH 2/9] Install missing dependency for windows --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f59233cd0..f5c5a1b2bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,8 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: npm + - if: ${{ matrix.os == windows-latest }} + run: npm i @nx/nx-win32-x64-msvc - run: npm ci - run: npm run test # Check that we can build our test apps using esbuild From 2bb92982269d666b4fb5e854ac820057d3e4b2c5 Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Wed, 30 Aug 2023 21:44:54 +0200 Subject: [PATCH 3/9] fixup! Install missing dependency for windows --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5c5a1b2bb..94e3bb43d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: npm - - if: ${{ matrix.os == windows-latest }} + - if: ${{ matrix.os == "windows-latest" }} run: npm i @nx/nx-win32-x64-msvc - run: npm ci - run: npm run test From de844444777da8b477b11b2599f9190d0d1e409b Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Wed, 30 Aug 2023 21:48:41 +0200 Subject: [PATCH 4/9] fixup! fixup! Install missing dependency for windows --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94e3bb43d5..14c868e613 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: ['ubuntu-latest', 'windows-latest'] node-version: ["20.x", "18.x", "16.x"] steps: - uses: actions/checkout@v4 @@ -25,7 +25,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: npm - - if: ${{ matrix.os == "windows-latest" }} + - if: ${{ matrix.os == 'windows-latest' }} run: npm i @nx/nx-win32-x64-msvc - run: npm ci - run: npm run test From 94391bc2cb47a33a0b4992425e19928314ceb473 Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Mon, 18 Sep 2023 14:02:54 +0200 Subject: [PATCH 5/9] Do not use OS-specific environment setup --- packages/browser/examples/demoClientApp/package.json | 2 +- packages/browser/examples/demoClientApp/webpack.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/browser/examples/demoClientApp/package.json b/packages/browser/examples/demoClientApp/package.json index acce886d60..765b70b3f9 100644 --- a/packages/browser/examples/demoClientApp/package.json +++ b/packages/browser/examples/demoClientApp/package.json @@ -8,7 +8,7 @@ "clean": "rm -rf ./dist", "start": "webpack-dev-server --mode development", "dev": "npm run start", - "build": "ASSET_PATH=\"/demo/\" webpack --mode production", + "build": "webpack --mode production", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/packages/browser/examples/demoClientApp/webpack.config.js b/packages/browser/examples/demoClientApp/webpack.config.js index 903aa6ece7..ae6c69a538 100644 --- a/packages/browser/examples/demoClientApp/webpack.config.js +++ b/packages/browser/examples/demoClientApp/webpack.config.js @@ -47,7 +47,7 @@ module.exports = { }), ], output: { - publicPath: process.env.ASSET_PATH || "/", + publicPath: "./demo/", }, devServer: { // TODO: PMCB55: make demo's 'prettier' by avoiding 'localhost'... From c5bb6d8c45bf6514d486f5d38af6cdcbc5469262 Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Mon, 18 Sep 2023 14:37:54 +0200 Subject: [PATCH 6/9] Add optional windows build dependency Nx has OS-specific dependencies, and it not being present on windows breaks the toolchaing. --- package-lock.json | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65d703de05..f98ef700b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,6 +55,7 @@ "node": "^16.0.0 || ^18.0.0 || ^20.0.0" }, "optionalDependencies": { + "@nx/nx-win32-x64-msvc": "^16.8.1", "fsevents": "^2.3.2" } }, @@ -4595,7 +4596,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" diff --git a/package.json b/package.json index db5ac8c01d..077b2ab3a2 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,8 @@ "typescript": "^5.2.2" }, "optionalDependencies": { - "fsevents": "^2.3.2" + "fsevents": "^2.3.2", + "@nx/nx-win32-x64-msvc": "^16.8.1" }, "engines": { "node": "^16.0.0 || ^18.0.0 || ^20.0.0" From 0b7817f13d345c797ce7b086b233bb63313fb93a Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Mon, 18 Sep 2023 14:47:24 +0200 Subject: [PATCH 7/9] Clean up CI --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14c868e613..5de8811eed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,6 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: npm - - if: ${{ matrix.os == 'windows-latest' }} - run: npm i @nx/nx-win32-x64-msvc - run: npm ci - run: npm run test # Check that we can build our test apps using esbuild From 654627628b59693108ad58458f0e6ebeb570c0dd Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Mon, 18 Sep 2023 14:58:51 +0200 Subject: [PATCH 8/9] Test running on MacOS --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5de8811eed..a9e5b737b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ['ubuntu-latest', 'windows-latest'] + # We test against different OSes, because the build toolchain has OS-specific dependencies. + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] node-version: ["20.x", "18.x", "16.x"] steps: - uses: actions/checkout@v4 From a41f60cc7db1dd28c1e7ed5901f40440b16518e8 Mon Sep 17 00:00:00 2001 From: Nicolas Ayral Seydoux Date: Mon, 18 Sep 2023 16:51:34 +0200 Subject: [PATCH 9/9] Run CI on macos --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9e5b737b8..d670a767ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: # We test against different OSes, because the build toolchain has OS-specific dependencies. - os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + os: ["ubuntu-latest", "windows-latest", "macos-latest"] node-version: ["20.x", "18.x", "16.x"] steps: - uses: actions/checkout@v4