From 55784da67ee08ea98e9d125b19ef2437f7c22f0f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:04:18 +0100 Subject: [PATCH 1/8] Run build workflow in CI on the windows & macos also Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/build.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20e642cb921..7130d22ff91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build on: pull_request: {} push: - branches: [master] + branches: [develop, master] # develop pushes and repository_dispatch handled in build_develop.yaml env: # These must be set for fetchdep.sh to get the right branch @@ -11,7 +11,16 @@ env: jobs: build: name: "Build" - runs-on: ubuntu-latest + # We build on all 3 platforms to ensure we don't have any OS-specific build incompatibilities + strategy: + matrix: + image: + - ubuntu-latest + - windows-latest + - macos-latest + # Skip the ubuntu-latest build for the develop branch as the dedicated CD build_develop workflow handles that + if: github.event_name != 'push' || github.ref_name != 'develop' || matrix.image != 'ubuntu-latest' + runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v4 From 7091765dd2a94ae8a61ee16c14ca8459c9c223bd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:11:04 +0100 Subject: [PATCH 2/8] Work around not having access to `matrix` in `job-if` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7130d22ff91..030c96ce0cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,12 @@ jobs: - ubuntu-latest - windows-latest - macos-latest - # Skip the ubuntu-latest build for the develop branch as the dedicated CD build_develop workflow handles that - if: github.event_name != 'push' || github.ref_name != 'develop' || matrix.image != 'ubuntu-latest' + isDevelop: + - ${{ github.event_name == 'push' && github.ref_name == 'develop' }} + # Skip the ubuntu-latest build for the develop branch as the dedicated CD build_develop workflow handles that + exclude: + - isDevelop: true + image: ubuntu-latest runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v4 From 12dfe9bbae7f97488279c7f4b214512d7b8a0ae1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:13:46 +0100 Subject: [PATCH 3/8] fail-fast: false Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 030c96ce0cc..2a791244d8b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,7 @@ jobs: name: "Build" # We build on all 3 platforms to ensure we don't have any OS-specific build incompatibilities strategy: + fail-fast: false matrix: image: - ubuntu-latest From c8029d9af7fb4c3f926dbf4b206adccc19e6dfa4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:18:42 +0100 Subject: [PATCH 4/8] Try to fix clean command Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5a5ea34590..1d197b616c4 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "i18n:sort": "jq --sort-keys '.' src/i18n/strings/en_EN.json > src/i18n/strings/en_EN.json.tmp && mv src/i18n/strings/en_EN.json.tmp src/i18n/strings/en_EN.json", "i18n:lint": "prettier --write src/i18n/strings/ --ignore-path /dev/null", "i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json", - "clean": "rimraf lib webapp", + "clean": "yarn rimraf lib webapp", "build": "yarn clean && yarn build:genfiles && yarn build:bundle", "build-stats": "yarn clean && yarn build:genfiles && yarn build:bundle-stats", "build:jitsi": "ts-node scripts/build-jitsi.ts", From e112f7e16d40ba9e6e5ffaf128f4ec25dd35d9f0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:38:42 +0100 Subject: [PATCH 5/8] Add to path manually Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/build.yml | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a791244d8b..6c5bbb2c37d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,5 +36,9 @@ jobs: - name: Install Dependencies run: "./scripts/layered.sh" + - name: "[Windows] Add bin to path" + if: matrix.image == 'windows-latest' + run: echo "${{ github.workspace }}/node_modules/.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Build run: "yarn build" diff --git a/package.json b/package.json index 1d197b616c4..a5a5ea34590 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "i18n:sort": "jq --sort-keys '.' src/i18n/strings/en_EN.json > src/i18n/strings/en_EN.json.tmp && mv src/i18n/strings/en_EN.json.tmp src/i18n/strings/en_EN.json", "i18n:lint": "prettier --write src/i18n/strings/ --ignore-path /dev/null", "i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json", - "clean": "yarn rimraf lib webapp", + "clean": "rimraf lib webapp", "build": "yarn clean && yarn build:genfiles && yarn build:bundle", "build-stats": "yarn clean && yarn build:genfiles && yarn build:bundle-stats", "build:jitsi": "ts-node scripts/build-jitsi.ts", From 10578da0cd15f310a9b35c7063f04599b2a6a314 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:40:19 +0100 Subject: [PATCH 6/8] Try again Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c5bbb2c37d..e116f622b60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: - name: "[Windows] Add bin to path" if: matrix.image == 'windows-latest' - run: echo "${{ github.workspace }}/node_modules/.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + run: echo "${{ github.workspace }}\\node_modules\\.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: Build run: "yarn build" From f93fd24c466ae45c64abfdd5828d143c4e6b59e5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:42:59 +0100 Subject: [PATCH 7/8] Cry Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e116f622b60..a446b6d958d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ env: PR_NUMBER: ${{ github.event.pull_request.number }} jobs: build: - name: "Build" + name: "Build on ${{ matrix.image }}" # We build on all 3 platforms to ensure we don't have any OS-specific build incompatibilities strategy: fail-fast: false @@ -36,9 +36,10 @@ jobs: - name: Install Dependencies run: "./scripts/layered.sh" - - name: "[Windows] Add bin to path" + # This is a CI specific issue, not worth investigating + - name: "[Windows] Manually install rimraf" if: matrix.image == 'windows-latest' - run: echo "${{ github.workspace }}\\node_modules\\.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + run: npm i -g rimraf - name: Build run: "yarn build" From 9f55af139dbdd48c24351c9b364ebaf7894695f1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Oct 2023 10:45:13 +0100 Subject: [PATCH 8/8] defaults.run.shell = bash Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a446b6d958d..0d52ad98dc9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,9 @@ jobs: - isDevelop: true image: ubuntu-latest runs-on: ${{ matrix.image }} + defaults: + run: + shell: bash steps: - uses: actions/checkout@v4 @@ -36,10 +39,5 @@ jobs: - name: Install Dependencies run: "./scripts/layered.sh" - # This is a CI specific issue, not worth investigating - - name: "[Windows] Manually install rimraf" - if: matrix.image == 'windows-latest' - run: npm i -g rimraf - - name: Build run: "yarn build"