2021-01-22 18:17:15 +00:00
|
|
|
# Copyright 2020-2021 Signal Messenger, LLC
|
2020-10-30 20:34:04 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
name: CI
|
2021-02-04 23:00:02 +00:00
|
|
|
on: [push, pull_request]
|
2020-03-18 17:50:20 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-03-20 17:33:55 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: lsb_release -a
|
|
|
|
- run: uname -a
|
2021-02-04 23:00:02 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
2020-03-20 17:33:55 +00:00
|
|
|
with:
|
2021-11-08 21:43:37 +00:00
|
|
|
node-version: '16.5.0'
|
2021-04-05 20:37:23 +00:00
|
|
|
- run: npm install -g yarn@1.22.10
|
2021-04-13 22:39:46 +00:00
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: node_modules
|
2021-05-18 20:48:10 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('yarn.lock', 'patches/**') }}
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
|
2020-03-20 17:33:55 +00:00
|
|
|
- run: yarn generate
|
|
|
|
- run: yarn lint
|
|
|
|
- run: yarn lint-deps
|
2021-01-07 21:39:17 +00:00
|
|
|
# - run: yarn lint-license-comments
|
2020-12-01 16:42:35 +00:00
|
|
|
- run: git diff --exit-code
|
2020-03-20 17:33:55 +00:00
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
macos:
|
2020-03-20 17:33:55 +00:00
|
|
|
needs: lint
|
2020-03-18 17:50:20 +00:00
|
|
|
runs-on: macos-latest
|
2020-04-07 00:33:47 +00:00
|
|
|
if: github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master'
|
2020-03-18 17:50:20 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: uname -a
|
2021-02-04 23:00:02 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
2020-03-18 17:50:20 +00:00
|
|
|
with:
|
2021-11-08 21:43:37 +00:00
|
|
|
node-version: '16.5.0'
|
2021-04-05 20:37:23 +00:00
|
|
|
- run: npm install -g yarn@1.22.10
|
2021-04-13 22:39:46 +00:00
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: node_modules
|
2021-05-18 20:48:10 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('yarn.lock', 'patches/**') }}
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: yarn generate
|
|
|
|
- run: yarn prepare-beta-build
|
|
|
|
- run: yarn build
|
|
|
|
- run: yarn test-node
|
|
|
|
- run: yarn test-electron
|
|
|
|
- run: yarn grunt test-release:osx
|
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
|
|
|
|
|
|
|
linux:
|
2020-03-20 17:33:55 +00:00
|
|
|
needs: lint
|
2020-03-18 17:50:20 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-03-20 17:33:55 +00:00
|
|
|
- run: lsb_release -a
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: uname -a
|
2021-02-04 23:00:02 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
2020-03-18 17:50:20 +00:00
|
|
|
with:
|
2021-11-08 21:43:37 +00:00
|
|
|
node-version: '16.5.0'
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: sudo apt-get install xvfb
|
2021-04-05 20:37:23 +00:00
|
|
|
- run: npm install -g yarn@1.22.10
|
2021-04-13 22:39:46 +00:00
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: node_modules
|
2021-05-18 20:48:10 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('yarn.lock', 'patches/**') }}
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: yarn generate
|
|
|
|
- run: yarn prepare-beta-build
|
|
|
|
- run: yarn build
|
|
|
|
- run: xvfb-run --auto-servernum yarn test-node
|
|
|
|
- run: xvfb-run --auto-servernum yarn test-electron
|
|
|
|
env:
|
|
|
|
LANG: en_US
|
|
|
|
LANGUAGE: en_US
|
|
|
|
- run: xvfb-run --auto-servernum yarn grunt test-release:linux
|
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
|
|
|
|
|
|
|
windows:
|
2020-03-20 17:33:55 +00:00
|
|
|
needs: lint
|
2020-03-18 17:50:20 +00:00
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: systeminfo
|
|
|
|
- run: git config --global core.autocrlf false
|
|
|
|
- run: git config --global core.eol lf
|
2021-02-04 23:00:02 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
2020-03-18 17:50:20 +00:00
|
|
|
with:
|
2021-11-08 21:43:37 +00:00
|
|
|
node-version: '16.5.0'
|
2021-04-05 20:37:23 +00:00
|
|
|
- run: npm install -g yarn@1.22.10
|
2021-04-13 22:39:46 +00:00
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: node_modules
|
2021-05-18 20:48:10 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/**') }}
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: yarn generate
|
|
|
|
- run: node build\grunt.js
|
|
|
|
- run: yarn test-node
|
|
|
|
- run: copy package.json temp.json
|
|
|
|
- run: del package.json
|
|
|
|
- run: type temp.json | findstr /v certificateSubjectName | findstr /v certificateSha1 > package.json
|
|
|
|
- run: yarn prepare-beta-build
|
|
|
|
- run: yarn build
|
|
|
|
- run: node build\grunt.js test
|
|
|
|
- run: node build\grunt.js test-release:win
|
|
|
|
env:
|
|
|
|
SIGNAL_ENV: production
|