Compare commits

...

5 Commits

Author SHA1 Message Date
Baptiste Augrain
9468e97c13 fix(linux): regroup deb and rpm package preparation [skip ci] 2023-08-04 19:52:37 +02:00
Baptiste Augrain
a631bc594c fix: remove npm config [skip ci] 2023-08-04 19:03:41 +02:00
Baptiste Augrain
13a608979c ci: nodejs is installed in build agents [skip ci] 2023-08-04 17:51:58 +02:00
Baptiste Augrain
025a078b3b fix(windows): don't move zip [skip ci] 2023-08-04 15:04:48 +02:00
Baptiste Augrain
f51c90526f feat: add flag to test assets builder in CI (#1590) 2023-08-04 14:36:30 +02:00
11 changed files with 66 additions and 72 deletions

View File

@@ -9,6 +9,9 @@ on:
new_release:
type: boolean
description: Force new Release
test_asset_builder:
type: boolean
description: Test the assets builder
schedule:
- cron: '0 8 * * *'
push:
@@ -51,6 +54,8 @@ jobs:
run: ./get_repo.sh
- name: Check PR or cron
env:
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
run: ./check_cron_or_pr.sh
dependencies:
@@ -84,14 +89,6 @@ jobs:
- uses: docker/setup-qemu-action@v2
if: matrix.vscode_arch == 'arm64' || matrix.vscode_arch == 'ppc64le'
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Yarn
run: npm install -g yarn
- name: Install remote dependencies
run: ./install_remote_dependencies.sh
@@ -151,14 +148,6 @@ jobs:
- name: Install GH
run: ./install_gh.sh
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Yarn
run: npm install -g yarn
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -181,7 +170,7 @@ jobs:
- name: Prepare assets
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
- name: Release
env:

View File

@@ -9,6 +9,9 @@ on:
new_release:
type: boolean
description: Force new Release
test_asset_builder:
type: boolean
description: Test the assets builder
schedule:
- cron: '0 8 * * *'
push:
@@ -58,6 +61,8 @@ jobs:
run: . get_repo.sh
- name: Check PR or cron
env:
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
run: . check_cron_or_pr.sh
- name: Check existing VSCodium tags/releases
@@ -79,7 +84,7 @@ jobs:
CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
- name: Release
env:

View File

@@ -9,6 +9,9 @@ on:
new_release:
type: boolean
description: Force new Release
test_asset_builder:
type: boolean
description: Test the assets builder
schedule:
- cron: '0 8 * * *'
push:
@@ -71,6 +74,8 @@ jobs:
run: ./get_repo.sh
- name: Check PR or cron
env:
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
run: ./check_cron_or_pr.sh
- name: Check existing VSCodium tags/releases
@@ -90,7 +95,7 @@ jobs:
- name: Prepare assets
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
- name: Release
env:

View File

@@ -9,6 +9,9 @@ on:
force_version:
type: boolean
description: Force update version
test_asset_builder:
type: boolean
description: Test the assets builder
schedule:
- cron: '0 18 * * *'
push:
@@ -48,6 +51,8 @@ jobs:
run: ./get_repo.sh
- name: Check PR or cron
env:
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
run: ./check_cron_or_pr.sh
dependencies:
@@ -81,14 +86,6 @@ jobs:
- uses: docker/setup-qemu-action@v2
if: matrix.vscode_arch == 'arm64' || matrix.vscode_arch == 'ppc64le'
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Yarn
run: npm install -g yarn
- name: Install remote dependencies
run: ./install_remote_dependencies.sh
@@ -146,14 +143,6 @@ jobs:
- name: Install GH
run: ./install_gh.sh
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Yarn
run: npm install -g yarn
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -176,7 +165,7 @@ jobs:
- name: Prepare assets
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
- name: Release
env:

View File

@@ -9,6 +9,9 @@ on:
force_version:
type: boolean
description: Force update version
test_asset_builder:
type: boolean
description: Test the assets builder
schedule:
- cron: '0 18 * * *'
push:
@@ -53,6 +56,8 @@ jobs:
run: . get_repo.sh
- name: Check PR or cron
env:
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
run: . check_cron_or_pr.sh
- name: Check existing VSCodium tags/releases
@@ -74,7 +79,7 @@ jobs:
CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
- name: Release
env:

View File

@@ -9,6 +9,9 @@ on:
force_version:
type: boolean
description: Force update version
test_asset_builder:
type: boolean
description: Test the assets builder
schedule:
- cron: '0 18 * * *'
push:
@@ -67,6 +70,8 @@ jobs:
run: ./get_repo.sh
- name: Check PR or cron
env:
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
run: ./check_cron_or_pr.sh
- name: Check existing VSCodium tags/releases
@@ -86,7 +91,7 @@ jobs:
- name: Prepare assets
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
- name: Release
env:

View File

@@ -10,9 +10,6 @@ fi
. version.sh
if [[ "${SHOULD_BUILD}" == "yes" ]]; then
npm config set scripts-prepend-node-path true
npm config set node_gyp
echo "MS_COMMIT=\"${MS_COMMIT}\""
. prepare_vscode.sh

View File

@@ -14,16 +14,23 @@ elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
export SHOULD_BUILD="yes"
export SHOULD_DEPLOY="no"
elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
echo "It's a Dispatch"
if [[ "${TEST_ASSET_BUILDER}" == "true" ]]; then
echo "It's testing the assets builder"
export SHOULD_DEPLOY="yes"
export SHOULD_BUILD="yes"
export SHOULD_DEPLOY="no"
else
echo "It's a Dispatch"
export SHOULD_DEPLOY="yes"
fi
else
echo "It's a Cron"
export SHOULD_DEPLOY="yes"
fi
if [[ "${GITHUB_ENV}" ]]; then
if [[ "${GITHUB_ENV}" ]]; then
echo "GITHUB_BRANCH=${GITHUB_BRANCH}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"

View File

@@ -83,31 +83,20 @@ docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodi
When inside the container, you can use the following commands to build:
```
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs desktop-file-utils
npm install -g yarn
cd /root/vscodium
. get_repo.sh
export SHOULD_BUILD=yes
export OS_NAME=linux
export VSCODE_ARCH=x64
. build.sh
./build/build.sh
```
### <a id="build-docker-arm32"></a>ARM 32bits
Firstly, create the container with:
```
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-armhf bash
```
like
```
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-armhf bash
```
When inside the container, you can use the following commands to build:
@@ -117,15 +106,7 @@ sudo apt-get install -y nodejs desktop-file-utils
cd /root/vscodium
. get_repo.sh
export SHOULD_BUILD=yes
export OS_NAME=linux
export VSCODE_ARCH=armhf
export npm_config_arch=armv7l
export npm_config_force_process_config="true"
. build.sh
./build/build.sh
```
## <a id="build-snap"></a>Build Snap

View File

@@ -1,3 +1,19 @@
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 0d7d3c5..90f75cc 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -299,4 +299,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
const prepareDebTask = task.define(`vscode-linux-${arch}-prepare-deb`, task.series(util.rimraf(`.build/linux/deb/${debArch}`), prepareDebPackage(arch)));
- gulp.task(prepareDebTask);
- const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, buildDebPackage(arch));
+ const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, task.series(prepareDebTask, buildDebPackage(arch)));
gulp.task(buildDebTask);
@@ -305,4 +304,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
const prepareRpmTask = task.define(`vscode-linux-${arch}-prepare-rpm`, task.series(util.rimraf(`.build/linux/rpm/${rpmArch}`), prepareRpmPackage(arch)));
- gulp.task(prepareRpmTask);
- const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, buildRpmPackage(arch));
+ const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, task.series(prepareRpmTask, buildRpmPackage(arch)));
gulp.task(buildRpmTask);
diff --git a/build/linux/dependencies-generator.js b/build/linux/dependencies-generator.js
index 0ea6699..c4524de 100644
--- a/build/linux/dependencies-generator.js

View File

@@ -99,11 +99,6 @@ elif [[ "${OS_NAME}" == "windows" ]]; then
cd ..
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
echo "Moving ZIP"
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip" "assets\\${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"
fi
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
echo "Moving System EXE"
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe" "assets\\${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"