Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fpm option to build script due to rpm upgrade issue #543

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
303 changes: 163 additions & 140 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,77 @@
env:
PYTHON_VERSION: 3.10
GITHUB_TOKEN: ENCRYPTED[13da504dc34d1608564d891fb7f456b546019d07d1abb059f9ab4296c56ccc0e6e32c7b313629776eda40ab74a54e95c]
GITHUB_TOKEN: ENCRYPTED[!b0ff4671044672be50914a3a10b49af642bd8e0e681a6f4e5855ec5230a5cf9afbc53d9e90239b8d2c79455f014f383f!]
# The above token, is a GitHub API Token, that allows us to download RipGrep without concern of API limits

linux_task:
alias: linux
container:
image: node:16-slim
memory: 8G
prepare_script:
- apt-get update
- export DEBIAN_FRONTEND="noninteractive"
- apt-get install -y
ffmpeg
rpm
build-essential
git
libsecret-1-dev
fakeroot
libx11-dev
libxkbfile-dev
libgdk-pixbuf2.0-dev
libgtk-3-dev
libxss-dev
libasound2-dev
libnss3
xvfb
- git submodule init
- git submodule update
- sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
install_script:
- yarn install --ignore-engines || yarn install --ignore-engines
build_script:
- yarn build
- yarn run build:apm
build_binary_script:
- yarn dist || yarn dist
binary_artifacts:
path: ./binaries/*
test_script:
- rm -R node_modules/electron; yarn install --check-files
- ./binaries/*AppImage --appimage-extract
- export BINARY_NAME='squashfs-root/pulsar'
- mkdir -p ./tests/videos
- Xvfb -screen 0 1024x768x24+32 :99 & nohup ffmpeg -video_size 1024x768 -f x11grab -i :99.0 ./tests/videos/out.mpg & DISPLAY=:99 PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
always:
videos_artifacts:
path: ./tests/videos/**
junit_artifacts:
path: report.xml
type: text/xml
format: junit
# linux_task:
# alias: linux
# container:
# image: node:16-slim
# memory: 8G
# prepare_script:
# - apt-get update
# - export DEBIAN_FRONTEND="noninteractive"
# - apt-get install -y
# ffmpeg
# rpm
# build-essential
# git
# libsecret-1-dev
# fakeroot
# libx11-dev
# libxkbfile-dev
# libgdk-pixbuf2.0-dev
# libgtk-3-dev
# libxss-dev
# libasound2-dev
# libnss3
# xvfb
# - git submodule init
# - git submodule update
# - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
# install_script:
# - yarn install --ignore-engines || yarn install --ignore-engines
# build_script:
# - yarn build
# - yarn run build:apm
# build_binary_script:
# - yarn dist || yarn dist
# rename_binary_script:
# - node script/rename.js "Linux"
# binary_artifacts:
# path: ./binaries/*
# test_script:
# - rm -R node_modules/electron; yarn install --check-files
# - ./binaries/*AppImage --appimage-extract
# - export BINARY_NAME='squashfs-root/pulsar'
# - mkdir -p ./tests/videos
# - Xvfb -screen 0 1024x768x24+32 :99 & nohup ffmpeg -video_size 1024x768 -f x11grab -i :99.0 ./tests/videos/out.mpg & DISPLAY=:99 PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
# always:
# videos_artifacts:
# path: ./tests/videos/**
# junit_artifacts:
# path: report.xml
# type: text/xml
# format: junit

arm_linux_task:
alias: linux
only_if: $CIRRUS_CRON != "" || $CIRRUS_TAG != ""
skip: $CIRRUS_CHANGE_IN_REPO == $CIRRUS_LAST_GREEN_CHANGE
arm_container:
image: node:16-slim
memory: 8G
env:
USE_SYSTEM_FPM: 'true'
ROLLING_UPLOAD_TOKEN: ENCRYPTED[690950798401ec3715e9d20ac29a0859d3c58097038081ff6afeaf4721e661672d34eb952d8a6442bc7410821ab8545a]
prepare_script:
- apt-get update
- export DEBIAN_FRONTEND="noninteractive"
- apt-get install -y
gnupg2
procps
curl
ruby
rpm
build-essential
git
Expand All @@ -79,10 +85,6 @@ arm_linux_task:
libasound2-dev
libnss3
xvfb
- gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
- \curl -sSL https://get.rvm.io | bash -s stable
- source /etc/profile.d/rvm.sh
- rvm install ruby
- gem install fpm
- git submodule init
- git submodule update
Expand All @@ -93,15 +95,20 @@ arm_linux_task:
- yarn build
- yarn run build:apm
build_binary_script:
- source /etc/profile.d/rvm.sh
- yarn dist || yarn dist
rename_binary_script:
- node script/rename.js "ARM.Linux"
binary_artifacts:
path: ./binaries/*
test_script:
- rm -R node_modules/electron; yarn install --check-files
- ./binaries/*AppImage --appimage-extract
- export BINARY_NAME='squashfs-root/pulsar'
- Xvfb :99 & DISPLAY=:99 PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
rolling_upload_script:
- cd ./script/rolling-release-scripts
- npm install
- node ./rolling-release-binary-upload.js cirrus
always:
videos_artifacts:
path: ./tests/videos/**
Expand All @@ -112,6 +119,8 @@ arm_linux_task:

silicon_mac_task:
alias: mac
only_if: $CIRRUS_CRON != "" || $CIRRUS_TAG != ""
skip: $CIRRUS_CHANGE_IN_REPO == $CIRRUS_LAST_GREEN_CHANGE
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:14
memory: 8G
Expand All @@ -121,6 +130,7 @@ silicon_mac_task:
APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
ROLLING_UPLOAD_TOKEN: ENCRYPTED[690950798401ec3715e9d20ac29a0859d3c58097038081ff6afeaf4721e661672d34eb952d8a6442bc7410821ab8545a]
prepare_script:
- brew install node@16 yarn git python@$PYTHON_VERSION
- git submodule init
Expand All @@ -138,14 +148,22 @@ silicon_mac_task:
build_binary_script:
- export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
- yarn dist || yarn dist
rename_binary_script:
- export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
- node script/rename.js "Silicon.Mac"
binary_artifacts:
path: ./binaries/*
test_script:
- export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
- rm -R node_modules/electron; yarn install --check-files
- hdiutil mount binaries/Pulsar*dmg
- hdiutil mount binaries/*Pulsar*dmg
- export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
- PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
rolling_upload_script:
- export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
- cd ./script/rolling-release-scripts
- npm install
- node ./rolling-release-binary-upload.js cirrus
always:
videos_artifacts:
path: ./tests/videos/**
Expand All @@ -154,89 +172,94 @@ silicon_mac_task:
type: text/xml
format: junit

intel_mac_task:
alias: mac
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:14
memory: 8G
env:
CSC_LINK: ENCRYPTED[0078015a03bb6cfdbd80113ae5bbb6f448fd4bbbc40efd81bf2cb1554373046b475a4d7c77e3e3e82ac1ce2f7e3d2da5]
CSC_KEY_PASSWORD: ENCRYPTED[82bb72653d39578035ed1860ab4978703d50bd326d925a146ff08782f987ceb37ac2d8dbace52dec2b0e2ef92debf097]
APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
prepare_script:
- sudo rm -rf /Library/Developer/CommandLineTools
- echo A | softwareupdate --install-rosetta
- arch -x86_64 xcode-select --install
- arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
- arch -x86_64 brew install node@16 yarn git python@$PYTHON_VERSION
- ln -s /usr/local/bin/python$PYTHON_VERSION /usr/local/bin/python
- git submodule init
- git submodule update
- sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
install_script:
- export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
- arch -x86_64 npx yarn install --ignore-engines || arch -x86_64 npx yarn install --ignore-engines
build_script:
- export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
- arch -x86_64 npx yarn build
- arch -x86_64 yarn run build:apm
build_binary_script:
- export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
- arch -x86_64 npx yarn dist || arch -x86_64 npx yarn dist
binary_artifacts:
path: ./binaries/*
test_script:
- export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
- rm -R node_modules/electron; yarn install --check-files
- hdiutil mount binaries/Pulsar*dmg
- export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
- PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml arch -x86_64 npx playwright test --reporter=junit,list
always:
videos_artifacts:
path: ./tests/videos/**
junit_artifacts:
path: report.xml
type: text/xml
format: junit
# intel_mac_task:
# alias: mac
# macos_instance:
# image: ghcr.io/cirruslabs/macos-monterey-xcode:14
# memory: 8G
# env:
# CSC_LINK: ENCRYPTED[0078015a03bb6cfdbd80113ae5bbb6f448fd4bbbc40efd81bf2cb1554373046b475a4d7c77e3e3e82ac1ce2f7e3d2da5]
# CSC_KEY_PASSWORD: ENCRYPTED[82bb72653d39578035ed1860ab4978703d50bd326d925a146ff08782f987ceb37ac2d8dbace52dec2b0e2ef92debf097]
# APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
# APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
# TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
# prepare_script:
# - sudo rm -rf /Library/Developer/CommandLineTools
# - echo A | softwareupdate --install-rosetta
# - arch -x86_64 xcode-select --install
# - arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
# - arch -x86_64 brew install node@16 yarn git python@$PYTHON_VERSION
# - ln -s /usr/local/bin/python$PYTHON_VERSION /usr/local/bin/python
# - git submodule init
# - git submodule update
# - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
# install_script:
# - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
# - arch -x86_64 npx yarn install --ignore-engines || arch -x86_64 npx yarn install --ignore-engines
# build_script:
# - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
# - arch -x86_64 npx yarn build
# - arch -x86_64 yarn run build:apm
# build_binary_script:
# - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
# - arch -x86_64 npx yarn dist || arch -x86_64 npx yarn dist
# rename_binary_script:
# - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
# - node script/rename.js "Intel.Mac"
# binary_artifacts:
# path: ./binaries/*
# test_script:
# - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
# - rm -R node_modules/electron; yarn install --check-files
# - hdiutil mount binaries/*Pulsar*dmg
# - export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
# - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml arch -x86_64 npx playwright test --reporter=junit,list
# always:
# videos_artifacts:
# path: ./tests/videos/**
# junit_artifacts:
# path: report.xml
# type: text/xml
# format: junit

windows_task:
alias: windows
timeout_in: 90m
windows_container:
image: cirrusci/windowsservercore:visualstudio2022-2022.06.23
env:
CIRRUS_SHELL: bash
PATH: C:\Python310\Scripts\;C:\Python310\;%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Roaming\npm;C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\
prepare_script:
- choco install nodejs --version=16.16.0 -y
- choco install python --version=3.10.3 -y
- choco install git visualstudio2019-workload-vctools -y
- git submodule init
- git submodule update
- npm config set python 'C:\Python310\python.exe'
install_script:
- npx yarn install --ignore-engines
|| rm -R node_modules && npx yarn install --ignore-engines
|| rm -R node_modules && npx yarn install --ignore-engines
build_script:
- npx yarn build:apm
- npx yarn build || npx yarn build || npx yarn build
build_binary_script:
- sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
- npx yarn dist || npx yarn dist || npx yarn dist
binary_artifacts:
path: .\binaries\*
test_script:
- mkdir extracted; tar -xf binaries/*zip -C ./extracted/
- export BINARY_NAME=./extracted/Pulsar.exe
- PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list || echo "Yeah, tests failed, Windows is like this"
always:
videos_artifacts:
path: ./tests/videos/**
junit_artifacts:
path: report.xml
type: text/xml
format: junit
# windows_task:
# alias: windows
# timeout_in: 90m
# windows_container:
# image: cirrusci/windowsservercore:visualstudio2022-2022.06.23
# env:
# CIRRUS_SHELL: bash
# PATH: C:\Python310\Scripts\;C:\Python310\;%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Roaming\npm;C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\
# prepare_script:
# - choco install nodejs --version=16.16.0 -y
# - choco install python --version=3.10.3 -y
# - choco install git visualstudio2019-workload-vctools -y
# - git submodule init
# - git submodule update
# - npm config set python 'C:\Python310\python.exe'
# install_script:
# - npx yarn install --ignore-engines
# || rm -R node_modules && npx yarn install --ignore-engines
# || rm -R node_modules && npx yarn install --ignore-engines
# build_script:
# - npx yarn build:apm
# - npx yarn build || npx yarn build || npx yarn build
# build_binary_script:
# - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
# - npx yarn dist || npx yarn dist || npx yarn dist
# rename_binary_script:
# - node script/rename.js "Windows"
# binary_artifacts:
# path: .\binaries\*
# test_script:
# - mkdir extracted; tar -xf binaries/*zip -C ./extracted/
# - export BINARY_NAME=./extracted/Pulsar.exe
# - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list || echo "Yeah, tests failed, Windows is like this"
# always:
# videos_artifacts:
# path: ./tests/videos/**
# junit_artifacts:
# path: report.xml
# type: text/xml
# format: junit
Loading