From 930c4d5b8128d7db95de261a207075e5d904040c Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 3 May 2021 16:35:09 +1000 Subject: [PATCH] fix windows build --- .github/workflows/build-binaries.yml | 22 ++++++++++---- .github/workflows/pull-request.yml | 30 +++++++++---------- .github/workflows/release.yml | 15 ++++++++-- .nvmrc | 2 +- .../conversation/SessionRightPanel.tsx | 1 + yarn.lock | 4 +-- 6 files changed, 47 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 45587fb2c..99b0c9140 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -5,10 +5,11 @@ on: push: branches: - master - - development - clearnet - - github-actions - - react-refactor + + pull_request: + branches: + - clearnet jobs: build: @@ -30,15 +31,24 @@ jobs: - name: Install node uses: actions/setup-node@v1 with: - node-version: 10.13.0 + node-version: 10.19.0 + + - name: Chocolatey Install Action + if: runner.os == 'Windows' + uses: crazy-max/ghaction-chocolatey@v1.4.2 + with: + args: install python2 visualcpp-build-tools -y + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + if: runner.os == 'Windows' - name: Setup node for windows if: runner.os == 'Windows' run: | - npm install --global --production windows-build-tools@4.0.0 npm install --global node-gyp@latest npm config set python python2.7 - npm config set msvs_version 2015 + npm config set msvs_version 2017 - name: Install yarn run: npm install yarn --no-save diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 78779acaa..fa5c758b0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,10 +4,7 @@ name: Session Test on: pull_request: branches: - - development - clearnet - - github-actions - - react-refactor jobs: build: @@ -28,38 +25,41 @@ jobs: - name: Pull git submodules run: git submodule update --init - # file server dependencies are not needed for now - # - name: Install file server dependency - # run: | - # cd session-file-server - # yarn install; - # cd - - - name: Install node uses: actions/setup-node@v1 with: - node-version: 10.13.0 + node-version: 10.19.0 + + - name: Chocolatey Install Action + if: runner.os == 'Windows' + uses: crazy-max/ghaction-chocolatey@v1.4.2 + with: + args: install python2 visualcpp-build-tools -y + + #Not having this will break the windows build because the PATH won't be set by msbuild. + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + if: runner.os == 'Windows' - name: Setup node for windows if: runner.os == 'Windows' run: | - npm install --global --production windows-build-tools@4.0.0 npm install --global node-gyp@latest npm config set python python2.7 - npm config set msvs_version 2015 + npm config set msvs_version 2017 - uses: actions/cache@v2 id: yarn-cache + if: runner.os != 'Windows' with: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - name: Install Dependencies #skipped if step before set variable to true + - name: Install Dependencies #skipped if step before set variable to true if: | steps.yarn-cache.outputs.cache-hit != 'true' run: yarn install --frozen-lockfile --network-timeout 600000 - - name: Generate and concat files run: yarn generate diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ea28d4a2..e7fdfd45b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,15 +26,24 @@ jobs: - name: Install node uses: actions/setup-node@v1 with: - node-version: 10.13.0 + node-version: 10.19.0 + + - name: Chocolatey Install Action + if: runner.os == 'Windows' + uses: crazy-max/ghaction-chocolatey@v1.4.2 + with: + args: install python2 visualcpp-build-tools -y + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + if: runner.os == 'Windows' - name: Setup node for windows if: runner.os == 'Windows' run: | - npm install --global --production windows-build-tools@4.0.0 npm install --global node-gyp@latest npm config set python python2.7 - npm config set msvs_version 2015 + npm config set msvs_version 2017 - name: Install yarn run: npm install yarn --no-save diff --git a/.nvmrc b/.nvmrc index db24ab967..5b7269c0a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -10.13.0 +10.19.0 diff --git a/ts/components/session/conversation/SessionRightPanel.tsx b/ts/components/session/conversation/SessionRightPanel.tsx index 90be5504b..c841a461d 100644 --- a/ts/components/session/conversation/SessionRightPanel.tsx +++ b/ts/components/session/conversation/SessionRightPanel.tsx @@ -307,6 +307,7 @@ class SessionRightPanel extends React.Component { {isGroup && ( + // tslint:disable-next-line: use-simple-attributes