Skip to content

Commit

Permalink
Package Cobalt for Linux
Browse files Browse the repository at this point in the history
Issue: 365150653
Reviewed-on: youtube#4760
  • Loading branch information
dahlstrom-g committed Jan 24, 2025
1 parent 2395442 commit cb359a4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cobalt/devinfra/kokoro/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ run_package_release_pipeline () {
"${package_dir}" \
"${bootloader_out_dir:-}"
else
cp "${out_dir}/cobalt" "${package_dir}"
python3 "${WORKSPACE_COBALT}/cobalt/devinfra/kokoro/build/linux/package.py" \
"${out_dir}" "${package_dir}"
fi

# Create and upload nightly archive.
Expand Down
24 changes: 24 additions & 0 deletions cobalt/devinfra/kokoro/build/linux/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
"""Packages Cobalt for Linux."""

import os
import shutil
import sys
import tempfile

out_dir = sys.argv[1]
package_dir = sys.argv[2]

with tempfile.TemporaryDirectory() as tmp_dir:
base_dir = os.path.join(tmp_dir, 'cobalt-linux')
os.makedirs(base_dir)

shutil.copy2(os.path.join(out_dir, 'cobalt'), base_dir)
shutil.copy2(os.path.join(out_dir, 'content_shell.pak'), base_dir)
shutil.copy2(os.path.join(out_dir, 'icudtl.dat'), base_dir)
shutil.copy2(os.path.join(out_dir, 'libEGL.so'), base_dir)
shutil.copy2(os.path.join(out_dir, 'libGLESv2.so'), base_dir)
shutil.copy2(os.path.join(out_dir, 'starboard/libstarboard.so.17'), base_dir)
shutil.copy2(os.path.join(out_dir, 'v8_context_snapshot.bin'), base_dir)

shutil.make_archive(os.path.join(package_dir, 'cobalt-linux'), 'zip', tmp_dir)

0 comments on commit cb359a4

Please sign in to comment.