-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36ff6e9
commit 4d3b66c
Showing
4 changed files
with
40 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
|
@@ -40,18 +38,6 @@ jobs: | |
run: yarn install | ||
env: | ||
npm_config_node_gyp: ${{ github.workspace }}${{ runner.os == 'Windows' && '\node_modules\node-gyp\bin\node-gyp.js' || '/node_modules/node-gyp/bin/node-gyp.js' }} | ||
- name: Install libarchive-tools | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt update | ||
sudo apt install libarchive-tools | ||
- name: Lint and Run Unit Tests | ||
run: yarn run test | ||
- name: Getting Build Icon | ||
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary' | ||
run: | | ||
cp build/canary.ico build/icon.ico | ||
cp build/canary.icns build/icon.icns | ||
- name: Build | ||
run: | | ||
if [ -z "$CSC_LINK" ] ; then unset CSC_LINK ; fi | ||
|
@@ -69,22 +55,16 @@ jobs: | |
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_P12_PASSWORD }} | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
- name: Archive Build Artifacts | ||
uses: LabhanshAgrawal/upload-artifact@v3 | ||
with: | ||
path: | | ||
dist/*.dmg | ||
dist/*.snap | ||
dist/*.AppImage | ||
dist/*.deb | ||
dist/*.rpm | ||
dist/*.pacman | ||
dist/*.exe | ||
- name: Run E2E Tests | ||
if: runner.os != 'Linux' | ||
run: yarn run test:e2e | ||
- name: Run E2E Tests on Linux | ||
if: runner.os == 'Linux' | ||
# uses: GabrielBB/[email protected] | ||
# with: | ||
# working-directory: . | ||
# run: yarn run test:e2e | ||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn run test:e2e | ||
env: | ||
DEBUG: 'x' | ||
- name: Archive E2E test screenshot | ||
if: runner.os != 'Linux' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: e2e | ||
|
@@ -105,76 +85,3 @@ jobs: | |
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'app/yarn.lock') }} | ||
|
||
build-linux-arm: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- name: armv7l | ||
cpu: cortex-a8 | ||
image: raspios_lite:latest | ||
- name: arm64 | ||
cpu: cortex-a53 | ||
image: raspios_lite_arm64:latest | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'app/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install | ||
run: | | ||
yarn install | ||
sudo apt update | ||
sudo apt install libarchive-tools | ||
- name: Compile | ||
run: yarn run build | ||
- name: rebuild node-pty | ||
uses: pguyot/[email protected] | ||
with: | ||
image_additional_mb: 2000 | ||
base_image: ${{ matrix.image }} | ||
cpu: ${{ matrix.cpu }} | ||
shell: bash | ||
copy_artifact_path: target/node_modules/node-pty | ||
copy_artifact_dest: target/node_modules | ||
commands: | | ||
wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-${{ matrix.name }}.tar.xz | ||
tar -xJf node-v18.16.0-linux-${{ matrix.name }}.tar.xz | ||
sudo cp node-v18.16.0-linux-${{ matrix.name }}/* /usr/local/ -R | ||
npm run rebuild-node-pty | ||
- name: chown node-pty | ||
run: | | ||
sudo chown -R $USER:$USER target/node_modules/node-pty | ||
- name: Prepare v8 snapshot | ||
if: matrix.name == 'armv7l' | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
sudo apt update | ||
sudo apt install -y libglib2.0-0:i386 libexpat1:i386 libgcc-s1:i386 | ||
npm_config_arch=armv7l yarn run v8-snapshot:arch | ||
- name: Build | ||
run: yarn run electron-builder -l deb rpm AppImage pacman --${{ matrix.name }} -c electron-builder-linux-ci.json | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Archive Build Artifacts | ||
uses: LabhanshAgrawal/upload-artifact@v3 | ||
with: | ||
path: | | ||
dist/*.snap | ||
dist/*.AppImage | ||
dist/*.deb | ||
dist/*.rpm | ||
dist/*.pacman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export const getFallBackShellConfig = ( | ||
shell: string, | ||
shellArgs: string[], | ||
defaultShell: string, | ||
defaultShellArgs: string[] | ||
): { | ||
shell: string; | ||
shellArgs: string[]; | ||
} | null => { | ||
if (shellArgs.length > 0) { | ||
return { | ||
shell, | ||
shellArgs: [] | ||
}; | ||
} | ||
|
||
if (shell != defaultShell) { | ||
return { | ||
shell: defaultShell, | ||
shellArgs: defaultShellArgs | ||
}; | ||
} | ||
|
||
return null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters