Skip to content

dev

dev #72

Workflow file for this run

name: crossover-ci
on:
push:
branches:
- dev
- master
- release
jobs:
crossover-ci-mac:
runs-on: macos-latest
steps:
# Make sure build is clean and no files from a previous run are re-used.
- name: Cleanup files before run
run: |
rm -rf *
if: ${{ always() }}
- uses: actions/checkout@v3
# Check memory and cpu
- name: Verify Runner Resources
run: |
sysctl -n machdep.cpu.brand_string
vm_stat | perl -ne '/page size of (\d+)/ and $size=$1; /Pages\s+([^:]+)[^\d]+(\d+)/ and printf("%-16s % 16.2f Mi\n", "$1:", $2 * $size / 1048576);'
- name: Get Node Version
run: |
echo "nodeversion=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: get-node-version
- name: Use Node.js ${{ steps.get-node-version.outputs.nodeversion }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.get-node-version.outputs.nodeversion }}
cache: "npm"
- name: Install Dependencies
run: |
env
echo "node: $(node --version)"
echo "npm: $(npm --version)"
echo "yarn: $(yarn --version)"
npm install --openssl_fips=""
- name: Lint
run: npm run lint
- name: Check Dependencies
run: npm run depcheck
# - name: Unpackaged Test πŸ§ͺ
# run: npm run test
- name: Build
run: |
npm run build:mac --openssl_fips=""
env:
# Set CI flag to false, or the build fails on all warnings, not just errors as locally.
CI: false
# - name: Package App
# run: |
# npm run pack
# # Check Binary Sizes
# - name: Build Succeeded
# run: |
# ls -alh dist | grep Monokle && du -sh dist/mac || true
# if: ${{ success() }}
# # - name: E2E Test for Electron πŸ§ͺ
# # run: npm run test
- name: Upload Test Results πŸ—ƒ
if: always()
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*
crossover-ci-windows:
runs-on: windows-latest
steps:
# Make sure build is clean and no files from a previous run are re-used.
- name: Cleanup files before run
run: |
cmd /r dir
if: ${{ always() }}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
- name: Checkout Project
uses: actions/checkout@v3
- name: Get Node Version
run: |
Set-PSDebug -Trace 1
$filePath = ".nvmrc"
Get-Content $filePath -Raw
$content = Get-Content $filePath -Raw
echo "nodeversion=$content" >> $GITHUB_OUTPUT
id: get-node-version
- name: Use Node.js ${{ steps.get-node-version.outputs.nodeversion }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.get-node-version.outputs.nodeversion }}
cache: "npm"
# - name: Get MSFT Cert
# id: write_file
# uses: timheuer/base64-to-file@v1
# with:
# fileName: "kubeshop_msft.p12"
# encodedString: ${{ secrets.CERT_MSFT_KUBESHOP_P12_B64 }}
# Install Dependencies
- name: Install Dependencies
run: |
Set-PSDebug -Trace 1
node --version
npm --version
yarn --version
npm install
# - name: Unpackaged Test πŸ§ͺ
# run: npm run test
- name: Build
run: |
npm run build:windows
env:
# Set CI flag to false, or the build fails on all warnings, not just errors as locally.
# We use circle as ci
CI: false
# - name: Package
# run: |
# npm exec -c 'electron-builder --publish "never"'
# env:
# GITHUB_TOKEN: ${{ secrets.github_token }}
# WIN_CSC_LINK: ${{ steps.write_file.outputs.filePath }}
# WIN_CSC_KEY_PASSWORD: ${{ secrets.CERT_MSFT_KUBESHOP_P12_PASSWORD }}
# EP_PRE_RELEASE: true
# USE_HARD_LINKS: false
# # Check Binary Sizes
# - name: Build Succeeded
# run: |
# cmd /r dir .\dist
# if: ${{ success() }}
# - name: E2E Test for Electron πŸ§ͺ
# run: npm run ui-test
# - name: Upload Test Results πŸ—ƒ
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: playwright-output
# path: test-output/**