mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-24 11:50:14 +10:00
Build cleanup and Windows ia32 (#103)
This commit is contained in:
committed by
GitHub
parent
0f3afe4cba
commit
f9f92ce008
@@ -2,6 +2,7 @@ matrix:
|
|||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
sudo: required
|
sudo: required
|
||||||
|
env: BUILDARCH=x64
|
||||||
- os: linux
|
- os: linux
|
||||||
sudo: required
|
sudo: required
|
||||||
env: BUILDARCH=ia32
|
env: BUILDARCH=ia32
|
||||||
|
|||||||
@@ -1,62 +1,16 @@
|
|||||||
pool:
|
jobs:
|
||||||
vmImage: 'vs2017-win2016'
|
- job: Windows
|
||||||
|
pool:
|
||||||
|
vmImage: VS2017-Win2016
|
||||||
|
variables:
|
||||||
|
BUILDARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: win32-build.yml
|
||||||
|
|
||||||
steps:
|
- job: Windows32
|
||||||
- task: NodeTool@0
|
pool:
|
||||||
inputs:
|
vmImage: VS2017-Win2016
|
||||||
versionSpec: '8.x'
|
variables:
|
||||||
- script: |
|
BUILDARCH: ia32
|
||||||
choco install jq
|
steps:
|
||||||
displayName: 'install jq from choco'
|
- template: win32-build.yml
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
|
||||||
displayName: 'Install Yarn'
|
|
||||||
- task: UsePythonVersion@0
|
|
||||||
displayName: 'Use Python 2.x'
|
|
||||||
inputs:
|
|
||||||
versionSpec: 2.x
|
|
||||||
- task: ShellScript@2
|
|
||||||
displayName: 'get VSCode sources'
|
|
||||||
inputs:
|
|
||||||
scriptPath: get_repo.sh
|
|
||||||
- powershell: |
|
|
||||||
$LATEST_MS_TAG="$(git -C vscode describe --tags)"
|
|
||||||
Write-Host "##vso[task.setvariable variable=LATEST_MS_TAG]$LATEST_MS_TAG"
|
|
||||||
displayName: 'set env LATEST_MS_TAG'
|
|
||||||
- task: PowerShell@2
|
|
||||||
inputs:
|
|
||||||
filePath: 'check_tags.ps1'
|
|
||||||
env:
|
|
||||||
MAPPED_GITHUB_TOKEN: $(GITHUB_TOKEN)
|
|
||||||
- script: |
|
|
||||||
git -C vscode status
|
|
||||||
displayName: 'vscode status'
|
|
||||||
- powershell: |
|
|
||||||
bash ./build.sh
|
|
||||||
displayName: 'go build it!'
|
|
||||||
- bash: |
|
|
||||||
if [[ "$SHOULD_BUILD" == "yes" ]]; then mv vscode\\.build\\win32-x64\\system-setup\\VSCodeSetup.exe VSCodiumSetup-x64-${LATEST_MS_TAG}.exe; fi
|
|
||||||
displayName: 'move the system setup'
|
|
||||||
- bash: |
|
|
||||||
if [[ "$SHOULD_BUILD" == "yes" ]]; then mv vscode\\.build\\win32-x64\\user-setup\\VSCodeSetup.exe VSCodiumUserSetup-x64-${LATEST_MS_TAG}.exe; fi
|
|
||||||
displayName: 'move the user setup'
|
|
||||||
- bash: |
|
|
||||||
if [[ "$SHOULD_BUILD" == "yes" ]]; then mv vscode\\.build\\win32-x64\\archive\\VSCode-win32-x64.zip VSCodium-win32-x64-${LATEST_MS_TAG}.zip; fi
|
|
||||||
displayName: 'move the zip folder'
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish artifacts: system-setup'
|
|
||||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: 'VSCodiumSetup-x64-$(LATEST_MS_TAG).exe'
|
|
||||||
ArtifactName: 'system_setup'
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish artifacts: user-setup'
|
|
||||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: 'VSCodiumUserSetup-x64-$(LATEST_MS_TAG).exe'
|
|
||||||
ArtifactName: 'user_setup'
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish artifacts: archive'
|
|
||||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: 'VSCodium-win32-x64-$(LATEST_MS_TAG).zip'
|
|
||||||
ArtifactName: 'archive'
|
|
||||||
42
build.sh
42
build.sh
@@ -3,15 +3,8 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
|
|||||||
cp -rp src/* vscode/
|
cp -rp src/* vscode/
|
||||||
cd vscode
|
cd vscode
|
||||||
|
|
||||||
if [[ "$BUILDARCH" == "ia32" ]]; then
|
export npm_config_arch="$BUILDARCH"
|
||||||
export npm_config_arch=ia32
|
export npm_config_target_arch="$BUILDARCH"
|
||||||
export npm_config_target_arch=ia32
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$BUILDARCH" == "arm64" ]]; then
|
|
||||||
export npm_config_arch=arm64
|
|
||||||
export npm_config_target_arch=arm64
|
|
||||||
fi
|
|
||||||
../update_settings.sh
|
../update_settings.sh
|
||||||
|
|
||||||
yarn
|
yarn
|
||||||
@@ -28,30 +21,21 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
|
|||||||
# as we are renaming the application to vscodium
|
# as we are renaming the application to vscodium
|
||||||
# we need to edit a line in the post install template
|
# we need to edit a line in the post install template
|
||||||
sed -i "s/code-oss/vscodium/" resources/linux/debian/postinst.template
|
sed -i "s/code-oss/vscodium/" resources/linux/debian/postinst.template
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
npm run gulp vscode-darwin-min
|
npm run gulp -- "vscode-darwin-min"
|
||||||
elif [[ "$BUILDARCH" == "ia32" ]]; then
|
|
||||||
npm run gulp vscode-linux-ia32-min
|
|
||||||
npm run gulp vscode-linux-ia32-build-deb
|
|
||||||
npm run gulp vscode-linux-ia32-build-rpm
|
|
||||||
unset npm_config_arch
|
|
||||||
elif [[ "$BUILDARCH" == "arm64" ]]; then
|
|
||||||
npm run gulp vscode-linux-arm64-min
|
|
||||||
npm run gulp vscode-linux-arm64-build-deb
|
|
||||||
# npm run gulp vscode-linux-arm64-build-rpm
|
|
||||||
elif [[ "$CI_WINDOWS" == "True" ]]; then
|
elif [[ "$CI_WINDOWS" == "True" ]]; then
|
||||||
cp LICENSE.txt LICENSE.rtf # windows build expects rtf license
|
cp LICENSE.txt LICENSE.rtf # windows build expects rtf license
|
||||||
npm run gulp vscode-win32-x64-min
|
npm run gulp -- "vscode-win32-${BUILDARCH}-min"
|
||||||
npm run gulp vscode-win32-x64-inno-updater
|
npm run gulp -- "vscode-win32-${BUILDARCH}-inno-updater"
|
||||||
npm run gulp vscode-win32-x64-system-setup
|
npm run gulp -- "vscode-win32-${BUILDARCH}-system-setup"
|
||||||
npm run gulp vscode-win32-x64-user-setup
|
npm run gulp -- "vscode-win32-${BUILDARCH}-user-setup"
|
||||||
npm run gulp vscode-win32-x64-archive
|
npm run gulp -- "vscode-win32-${BUILDARCH}-archive"
|
||||||
else
|
else # linux
|
||||||
npm run gulp vscode-linux-x64-min
|
npm run gulp -- "vscode-linux-${BUILDARCH}-min"
|
||||||
npm run gulp vscode-linux-x64-build-deb
|
npm run gulp -- "vscode-linux-${BUILDARCH}-build-deb"
|
||||||
npm run gulp vscode-linux-x64-build-rpm
|
npm run gulp -- "vscode-linux-${BUILDARCH}-build-rpm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
echo "tag: $env:LATEST_MS_TAG"
|
echo "tag: $env:LATEST_MS_TAG"
|
||||||
$GITHUB_RESPONSE = curl.exe -s -H "Authorization: token $env:MAPPED_GITHUB_TOKEN" "https://api.github.com/repos/vscodium/vscodium/releases/tags/$env:LATEST_MS_TAG"
|
$REPO_URI = [uri]$env:BUILD_REPOSITORY_URI
|
||||||
|
$USER_REPO = $REPO_URI."LocalPath"
|
||||||
|
echo $USER_REPO
|
||||||
|
$GITHUB_RESPONSE = curl.exe -s -H "Authorization: token $env:MAPPED_GITHUB_TOKEN" "https://api.github.com/repos$USER_REPO/releases/tags/$env:LATEST_MS_TAG"
|
||||||
echo "Github response: ${GITHUB_RESPONSE}"
|
echo "Github response: ${GITHUB_RESPONSE}"
|
||||||
$VSCODIUM_ASSETS= $GITHUB_RESPONSE | jq '.assets'
|
$VSCODIUM_ASSETS = $GITHUB_RESPONSE | jq '.assets'
|
||||||
echo "VSCodium assets: ${VSCODIUM_ASSETS}"
|
echo "VSCodium assets: ${VSCODIUM_ASSETS}"
|
||||||
|
|
||||||
# if we just don't have the github token, get out fast
|
# if we just don't have the github token, get out fast
|
||||||
@@ -11,24 +14,25 @@ if (!$env:MAPPED_GITHUB_TOKEN -or $env:MAPPED_GITHUB_TOKEN -like "*GITHUB_TOKEN*
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$VSCODIUM_ASSETS) {
|
if ($VSCODIUM_ASSETS -eq "null" -or !$VSCODIUM_ASSETS) {
|
||||||
echo "Release assets do not exist at all, continuing build"
|
echo "Release assets do not exist at all, continuing build"
|
||||||
$SHOULD_BUILD = 'yes'
|
$SHOULD_BUILD = 'yes'
|
||||||
|
} else {
|
||||||
|
$WindowsAssets = ($VSCODIUM_ASSETS | ConvertFrom-Json) | Where-Object { $_.name.Contains('exe') }
|
||||||
|
$SYSTEM_SETUP = $WindowsAssets | Where-Object { $_.name.Contains('Setup') }
|
||||||
|
$USER_SETUP = $WindowsAssets | Where-Object { $_.name.Contains('User') }
|
||||||
|
if (!$SYSTEM_SETUP) {
|
||||||
|
echo "Building on Windows because we have no system-setup.exe";
|
||||||
|
$SHOULD_BUILD = 'yes'
|
||||||
|
}
|
||||||
|
elseif (!$USER_SETUP) {
|
||||||
|
echo "Building on Windows because we have no user-setup.exe";
|
||||||
|
$SHOULD_BUILD = 'yes'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Already have all the Windows builds"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$WindowsAssets = ($VSCODIUM_ASSETS | ConvertFrom-Json) | Where-Object { $_.name.Contains('exe') }
|
|
||||||
$SYSTEM_SETUP = $WindowsAssets | Where-Object { $_.name.Contains('Setup') }
|
|
||||||
$USER_SETUP = $WindowsAssets | Where-Object { $_.name.Contains('User') }
|
|
||||||
if (!$SYSTEM_SETUP) {
|
|
||||||
echo "Building on Windows because we have no system-setup.exe";
|
|
||||||
$SHOULD_BUILD = 'yes'
|
|
||||||
}
|
|
||||||
elseif (!$USER_SETUP) {
|
|
||||||
echo "Building on Windows because we have no user-setup.exe";
|
|
||||||
$SHOULD_BUILD = 'yes'
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "Already have all the Windows builds"
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "##vso[task.setvariable variable=SHOULD_BUILD]$SHOULD_BUILD"
|
Write-Host "##vso[task.setvariable variable=SHOULD_BUILD]$SHOULD_BUILD"
|
||||||
59
win32-build.yml
Normal file
59
win32-build.yml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '8.x'
|
||||||
|
- script: |
|
||||||
|
choco install jq
|
||||||
|
displayName: 'install jq from choco'
|
||||||
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
|
displayName: 'Install Yarn'
|
||||||
|
- task: UsePythonVersion@0
|
||||||
|
displayName: 'Use Python 2.x'
|
||||||
|
inputs:
|
||||||
|
versionSpec: 2.x
|
||||||
|
- task: ShellScript@2
|
||||||
|
displayName: 'get VSCode sources'
|
||||||
|
inputs:
|
||||||
|
scriptPath: get_repo.sh
|
||||||
|
- powershell: |
|
||||||
|
$LATEST_MS_TAG="$(git -C vscode describe --tags)"
|
||||||
|
Write-Host "##vso[task.setvariable variable=LATEST_MS_TAG]$LATEST_MS_TAG"
|
||||||
|
displayName: 'set env LATEST_MS_TAG'
|
||||||
|
- task: PowerShell@2
|
||||||
|
inputs:
|
||||||
|
filePath: 'check_tags.ps1'
|
||||||
|
env:
|
||||||
|
MAPPED_GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||||
|
- script: |
|
||||||
|
git -C vscode status
|
||||||
|
displayName: 'vscode status'
|
||||||
|
- powershell: |
|
||||||
|
bash ./build.sh
|
||||||
|
displayName: 'go build it!'
|
||||||
|
- bash: |
|
||||||
|
if [[ "$SHOULD_BUILD" == "yes" ]]; then mv vscode\\.build\\win32-$(BUILDARCH)\\system-setup\\VSCodeSetup.exe VSCodiumSetup-$(BUILDARCH)-${LATEST_MS_TAG}.exe; fi
|
||||||
|
displayName: 'move the system setup'
|
||||||
|
- bash: |
|
||||||
|
if [[ "$SHOULD_BUILD" == "yes" ]]; then mv vscode\\.build\\win32-$(BUILDARCH)\\user-setup\\VSCodeSetup.exe VSCodiumUserSetup-$(BUILDARCH)-${LATEST_MS_TAG}.exe; fi
|
||||||
|
displayName: 'move the user setup'
|
||||||
|
- bash: |
|
||||||
|
if [[ "$SHOULD_BUILD" == "yes" ]]; then mv vscode\\.build\\win32-$(BUILDARCH)\\archive\\VSCode-win32-$(BUILDARCH).zip VSCodium-win32-$(BUILDARCH)-${LATEST_MS_TAG}.zip; fi
|
||||||
|
displayName: 'move the zip folder'
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: 'Publish artifacts: system-setup'
|
||||||
|
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: 'VSCodiumSetup-$(BUILDARCH)-$(LATEST_MS_TAG).exe'
|
||||||
|
ArtifactName: 'system_setup'
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: 'Publish artifacts: user-setup'
|
||||||
|
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: 'VSCodiumUserSetup-$(BUILDARCH)-$(LATEST_MS_TAG).exe'
|
||||||
|
ArtifactName: 'user_setup'
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: 'Publish artifacts: archive'
|
||||||
|
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: 'VSCodium-win32-$(BUILDARCH)-$(LATEST_MS_TAG).zip'
|
||||||
|
ArtifactName: 'archive'
|
||||||
Reference in New Issue
Block a user