Skip to content

Commit

Permalink
Fix the release workflow and enable GCS in the Windows binaries. (#4439)
Browse files Browse the repository at this point in the history
This PR fixes the release workflow for macOS by updating the OS image
(it used macOS 11 while regular CI uses 12), enables GCS in the released
Windows binaries, and does two other changes that should speed-up the
release workflow on Windows.

---
TYPE: NO_HISTORY
  • Loading branch information
teo-tsirpanis authored Oct 23, 2023
1 parent 2e95dcc commit ab87e06
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 71 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,28 +129,7 @@ jobs:
fetch-depth: 0

- name: Prevent vcpkg from building debug variants
shell: python
run: |
import os
workspace = os.environ["GITHUB_WORKSPACE"]
triplet_paths = [os.path.join(workspace, "external", "vcpkg", "triplets"),
os.path.join(workspace, "ports", "triplets")]
for triplet_path in triplet_paths:
for path, dnames, fnames in os.walk(triplet_path):
for fname in fnames:
fname = os.path.join(path, fname)
print(fname)
with open(fname, "rb") as handle:
contents = handle.read()
# If a file is already patched we skip patching it again because
# this affects the hashes calculated by vcpkg for caching
if b"VCPKG_BUILD_TYPE release" in contents:
continue
contents += b"\nset(VCPKG_BUILD_TYPE release)\n"
with open(fname, "wb") as handle:
handle.write(contents)
run: python $env:GITHUB_WORKSPACE/scripts/ci/patch_vcpkg_triplets.py

- name: core tiledb windows build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
echo "${{ toJSON(steps.runvcpkg.outputs) }}"
- name: Prevent vpckg from building debug variants
run: ./scripts/ci/posix/patch_vcpkg_triplets.sh
run: python ./scripts/ci/patch_vcpkg_triplets.py

- name: Setup sccache
uses: mozilla-actions/[email protected]
Expand Down
7 changes: 3 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ stages:
strategy:
matrix:
macOS:
imageName: 'macos-11'
imageName: 'macos-12'
CXX: clang++
ARTIFACT_OS: 'macos'
ARTIFACT_ARCH: 'x86_64'
CMAKE_OSX_ARCHITECTURES: "x86_64"
macOS_arm64:
imageName: 'macos-11'
imageName: 'macos-12'
CXX: clang++
ARTIFACT_OS: 'macos'
ARTIFACT_ARCH: 'arm64'
Expand Down Expand Up @@ -104,13 +104,12 @@ stages:
steps:
- template: scripts/azure-linux_mac-release.yml
- job: Windows
timeoutInMinutes: 90
timeoutInMinutes: 120
strategy:
matrix:
VS2019:
imageName: 'windows-2019'
# Only S3 variable is currently supported in bootstrap powershell
TILEDB_GCS: OFF
TILEDB_HDFS: OFF
ARTIFACT_OS: 'windows'
ARTIFACT_ARCH: 'x86_64'
Expand Down
5 changes: 4 additions & 1 deletion scripts/azure-linux_mac-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ steps:
condition: eq(variables['Agent.OS'], 'Darwin')
displayName: 'Install brew packages for macOS build'

- bash: python ./scripts/ci/patch_vcpkg_triplets.py
displayName: Prevent vpckg from building debug variants

# Tried using mamba for manylinux missing packages - switched to custom image instead.
#- bash: |
# curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
Expand Down Expand Up @@ -133,7 +136,7 @@ steps:

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.Repository.LocalPath)'
rootFolderOrFile: '$(Build.Repository.LocalPath)/build'
includeRootFolder: false
archiveType: 'tar' # Options: zip, 7z, tar, wim
tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
Expand Down
9 changes: 6 additions & 3 deletions scripts/azure-windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ steps:
env: { sourceVersion: $(Build.SourceVersion) }
displayName: Git Hash 7-digit

- powershell: python ./scripts/ci/patch_vcpkg_triplets.py
displayName: Prevent vpckg from building debug variants

- powershell: |
mkdir $env:AGENT_BUILDDIRECTORY\build
cd $env:AGENT_BUILDDIRECTORY\build
Expand All @@ -24,15 +27,15 @@ steps:
$host.SetShouldExit(3)
}
$bootstrapOptions = "-EnableVerbose -EnableStaticTileDB"
$bootstrapOptions = "-EnableVerbose -EnableStaticTileDB -DisableTests"
if ($env:TILEDB_S3 -eq "ON") {
$bootstrapOptions = "-EnableS3 " + $bootstrapOptions
}
if ($env:TILEDB_AZURE -eq "ON") {
$bootstrapOptions = "-EnableAzure " + $bootstrapOptions
}
if ($env:TILEDB_GCS -eq "ON") {
$bootstrapOptions = "-EnableGCS " + $bootstrapOptions
$bootstrapOptions = "-EnableGcs " + $bootstrapOptions
#NOTE: GCS simulator not yet actually in place.
}
if ($env:TILEDB_SERIALIZATION -eq "ON") {
Expand Down Expand Up @@ -116,7 +119,7 @@ steps:

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Agent.BuildDirectory)\s\'
rootFolderOrFile: '$(Agent.BuildDirectory)\build\'
includeRootFolder: false
archiveType: 'zip' # Options: zip, 7z, tar, wim
archiveFile: $(Build.ArtifactStagingDirectory)/tiledb-$(ARTIFACT_OS)-$(ARTIFACT_ARCH)-build-dir.zip
Expand Down
20 changes: 20 additions & 0 deletions scripts/ci/patch_vcpkg_triplets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os

workspace = os.curdir
triplet_paths = [os.path.join(workspace, "external", "vcpkg", "triplets"),
os.path.join(workspace, "ports", "triplets")]

for triplet_path in triplet_paths:
for path, dnames, fnames in os.walk(triplet_path):
for fname in fnames:
fname = os.path.join(path, fname)
print(fname)
with open(fname, "rb") as handle:
contents = handle.read()
# If a file is already patched we skip patching it again because
# this affects the hashes calculated by vcpkg for caching
if b"VCPKG_BUILD_TYPE release" in contents:
continue
contents += b"\nset(VCPKG_BUILD_TYPE release)\n"
with open(fname, "wb") as handle:
handle.write(contents)
40 changes: 0 additions & 40 deletions scripts/ci/posix/patch_vcpkg_triplets.sh

This file was deleted.

0 comments on commit ab87e06

Please sign in to comment.