mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-13 16:34:41 +08:00
update: add linux fedora container CI - CPP build test only (#2722)
* update: add linux_fedora_build_cpp CI - CPP build test only - x86-64 Signed-off-by: Melissa Kilby <mkilby@apple.com> * update: add linux_fedora_build_cpp_aarch64 CI - CPP build test only - arm64 Co-authored-by: Mike Drob <mdrob@apple.com> Signed-off-by: Melissa Kilby <mkilby@apple.com> * update: convert linux_fedora_build_cpp to matrix.arch loop Co-authored-by: Mike Drob <mdrob@apple.com> Signed-off-by: Melissa Kilby <mkilby@apple.com> --------- Signed-off-by: Melissa Kilby <mkilby@apple.com> Co-authored-by: Mike Drob <mdrob@apple.com>
This commit is contained in:
27
.github/scripts/setup+build-cpp-linux-fedora-container.sh
vendored
Executable file
27
.github/scripts/setup+build-cpp-linux-fedora-container.sh
vendored
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# [Setup] Install dependencies inside the container.
|
||||||
|
dnf update -y
|
||||||
|
dnf install -y \
|
||||||
|
blas-devel \
|
||||||
|
lapack-devel \
|
||||||
|
openblas-devel \
|
||||||
|
make \
|
||||||
|
cmake \
|
||||||
|
clang \
|
||||||
|
git
|
||||||
|
dnf clean all
|
||||||
|
|
||||||
|
# [C++] CI Build Sanity Check: Verifies code compilation, not for release.
|
||||||
|
export CMAKE_ARGS="-DCMAKE_COMPILE_WARNING_AS_ERROR=ON"
|
||||||
|
export DEBUG=1
|
||||||
|
export CMAKE_C_COMPILER=/usr/bin/clang
|
||||||
|
export CMAKE_CXX_COMPILER=/usr/bin/clang++
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
pushd build
|
||||||
|
cmake .. -DMLX_BUILD_METAL=OFF -DCMAKE_BUILD_TYPE=DEBUG
|
||||||
|
make -j $(nproc)
|
||||||
|
./tests/tests
|
||||||
|
popd
|
||||||
21
.github/workflows/nightly.yml
vendored
21
.github/workflows/nightly.yml
vendored
@@ -91,3 +91,24 @@ jobs:
|
|||||||
path: wheelhouse/mlx_cuda-*.whl
|
path: wheelhouse/mlx_cuda-*.whl
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
|
linux_fedora_build_cpp:
|
||||||
|
name: Linux Fedora CPP Build (${{ matrix.arch }})
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- host: ubuntu-22.04
|
||||||
|
arch: x86_64
|
||||||
|
- host: ubuntu-22.04-arm
|
||||||
|
arch: aarch64
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.host }}
|
||||||
|
container:
|
||||||
|
image: fedora:42
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: CPP Build Test - No Release
|
||||||
|
run: |
|
||||||
|
bash ./.github/scripts/setup+build-cpp-linux-fedora-container.sh
|
||||||
|
|||||||
22
.github/workflows/pull_request.yml
vendored
22
.github/workflows/pull_request.yml
vendored
@@ -44,3 +44,25 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: ./.github/actions/build-docs
|
- uses: ./.github/actions/build-docs
|
||||||
|
|
||||||
|
linux_fedora_build_cpp:
|
||||||
|
name: Linux Fedora CPP Build (${{ matrix.arch }})
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- host: ubuntu-22.04
|
||||||
|
arch: x86_64
|
||||||
|
- host: ubuntu-22.04-arm
|
||||||
|
arch: aarch64
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.host }}
|
||||||
|
container:
|
||||||
|
image: fedora:42
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: CPP Build Test - No Release
|
||||||
|
run: |
|
||||||
|
bash ./.github/scripts/setup+build-cpp-linux-fedora-container.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user