Skip to content

Crossbow

Crossbow #279196

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# NOTE: must set "Crossbow" as name to have the badge links working in the
# github comment reports!
name: Crossbow
on:
push:
branches:
- "*-github-*"
env:
ARCHERY_DEBUG: 1
jobs:
ubuntu:
name: AMD64 Ubuntu 20.04 MATLAB
runs-on: ubuntu-20.04
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: apache/arrow
ref: d0e7d07dfdcbf5382932292e512d7b9013b29cb6
submodules: recursive
- name: Install ninja-build
run: sudo apt-get update && sudo apt-get install ninja-build
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2024a
- name: Build MATLAB Interface
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
run: arrow/ci/scripts/matlab_build.sh $(pwd)/arrow
- name: Change shared library dependency name
# MATLAB's programmatic packaging interface does not properly
# include symbolic link files in the package MLTBX - this is a
# bug. As a temporary workaround, change the expected name of the
# Arrow C++ library which libarrowproxy.so depends on. For example,
# change libarrow.so.1500 to libarrow.so.1500.0.0.
run: |
pushd arrow/matlab/install/arrow_matlab/+libmexclass/+proxy/
SYMLINK_ARROW_LIB="$(find . -name 'libarrow.so.*' -type l | xargs basename)"
REGULAR_ARROW_LIB="$(echo libarrow.so.*.*)"
echo "SYMLINK_ARROW_LIB = ${SYMLINK_ARROW_LIB}"
echo "REGULAR_ARROW_LIB = ${REGULAR_ARROW_LIB}"
patchelf --replace-needed $SYMLINK_ARROW_LIB $REGULAR_ARROW_LIB libarrowproxy.so
popd
- name: Compress into single artifact
run: tar -cvzf matlab-arrow-ubuntu.tar.gz arrow/matlab/install/arrow_matlab
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: matlab-arrow-ubuntu.tar.gz
path: matlab-arrow-ubuntu.tar.gz
macos:
name: ${{ matrix.platform.architecture}} macOS ${{ matrix.platform.macos-version }} MATLAB
runs-on: macos-${{ matrix.platform.macos-version }}
strategy:
matrix:
platform:
- { architecture: "AMD64", macos-version: "12", architecture-suffix: "x64"}
- { architecture: "ARM64", macos-version: "14", architecture-suffix: "arm64"}
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: apache/arrow
ref: d0e7d07dfdcbf5382932292e512d7b9013b29cb6
submodules: recursive
- name: Install ninja-build
run: brew install ninja
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2024a
- name: Build MATLAB Interface
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
run: arrow/ci/scripts/matlab_build.sh $(pwd)/arrow
- name: Update dynamic library names
run: |
arrow/dev/tasks/matlab/rename_macos_dynamic_libraries.sh \
arrow/matlab/install/arrow_matlab/+libmexclass/+proxy \
${{ matrix.platform.architecture-suffix }}
- name: Compress into single artifact
run: tar -cvzf matlab-arrow-macos-${{ matrix.platform.architecture-suffix }}.tar.gz arrow/matlab/install/arrow_matlab
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: matlab-arrow-macos-${{ matrix.platform.architecture-suffix }}.tar.gz
path: matlab-arrow-macos-${{ matrix.platform.architecture-suffix }}.tar.gz
windows:
name: AMD64 Windows 2022 MATLAB
runs-on: windows-2022
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: apache/arrow
ref: d0e7d07dfdcbf5382932292e512d7b9013b29cb6
submodules: recursive
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2024a
- name: Install sccache
shell: bash
run: arrow/ci/scripts/install_sccache.sh pc-windows-msvc $(pwd)/sccache
- name: Build MATLAB Interface
shell: cmd
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
bash -c "arrow/ci/scripts/matlab_build.sh $(pwd)/arrow"
- name: Compress into single artifact
shell: bash
run: tar -cvzf matlab-arrow-windows.tar.gz arrow/matlab/install/arrow_matlab
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: matlab-arrow-windows.tar.gz
path: matlab-arrow-windows.tar.gz
package-mltbx:
name: Package MATLAB Toolbox (MLTBX) Files
runs-on: ubuntu-latest
needs:
- ubuntu
- macos
- windows
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 0
path: arrow
repository: apache/arrow
ref: d0e7d07dfdcbf5382932292e512d7b9013b29cb6
submodules: recursive
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts-downloaded
- name: Decompress Artifacts
run: |
mv artifacts-downloaded/*/*.tar.gz .
tar -xzvf matlab-arrow-ubuntu.tar.gz
tar -xzvf matlab-arrow-macos-x64.tar.gz
tar -xzvf matlab-arrow-macos-arm64.tar.gz
tar -xzvf matlab-arrow-windows.tar.gz
- name: Copy LICENSE.txt and NOTICE.txt for packaging
run: |
cp arrow/LICENSE.txt arrow/matlab/install/arrow_matlab/LICENSE.txt
cp arrow/NOTICE.txt arrow/matlab/install/arrow_matlab/NOTICE.txt
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2024a
- name: Run commands
env:
MATLABPATH: arrow/matlab/tools
ARROW_MATLAB_TOOLBOX_FOLDER: arrow/matlab/install/arrow_matlab
ARROW_MATLAB_TOOLBOX_OUTPUT_FOLDER: artifacts/matlab-dist
ARROW_MATLAB_TOOLBOX_VERSION: 18.0.0
uses: matlab-actions/run-command@v2
with:
command: packageMatlabInterface
- name: Set up Python by actions/setup-python
if: |
!(runner.os == 'Linux' && runner.arch != 'X64')
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Set up Python by apt
if: runner.os == 'Linux' && runner.arch != 'X64'
run: |
sudo apt update
sudo apt install -y \
libgit2-dev \
libpython3-dev \
python3-pip
sudo python3 -m pip install --upgrade pip
- name: Checkout Crossbow
uses: actions/checkout@v4
with:
path: crossbow
ref: release-18.0.0-rc0-1
- name: Setup Crossbow
shell: bash
run: |
python3 -m pip install -e arrow/dev/archery[crossbow]
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Upload artifacts
shell: bash
run: |
archery crossbow \
--queue-path $(pwd)/crossbow \
--queue-remote https://github.com/ursacomputing/crossbow.git \
upload-artifacts \
--sha release-18.0.0-rc0-1-github-matlab \
--tag release-18.0.0-rc0-1-github-matlab \
"artifacts/matlab-dist/*.mltbx"
env:
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- name: Verify uploaded artifacts
shell: bash
run: |
archery crossbow \
--queue-path $(pwd)/crossbow \
--queue-remote https://github.com/ursacomputing/crossbow.git \
status \
--task-filter 'matlab' \
--no-fetch \
--validate \
release-18.0.0-rc0-1
env:
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}