use gcc from homebrew #450
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: posix | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: null | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| env: | |
| REPO_DIR: OpenBLAS | |
| OPENBLAS_COMMIT: "v0.3.30" | |
| MACOSX_DEPLOYMENT_TARGET: 10.9 | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-13] | |
| PLAT: [i686, x86_64] | |
| INTERFACE64: ['0', '1'] | |
| MB_ML_VER: ['2014'] | |
| MB_ML_LIBC: ['manylinux'] | |
| include: | |
| - os: macos-13 | |
| PLAT: arm64 | |
| INTERFACE64: '1' | |
| - os: macos-13 | |
| PLAT: arm64 | |
| INTERFACE64: '0' | |
| - os: ubuntu-latest | |
| PLAT: x86_64 | |
| INTERFACE64: '1' | |
| MB_ML_LIBC: musllinux | |
| MB_ML_VER: _1_2 | |
| - os: ubuntu-latest | |
| PLAT: x86_64 | |
| INTERFACE64: '0' | |
| MB_ML_LIBC: musllinux | |
| MB_ML_VER: _1_2 | |
| - os: ubuntu-24.04-arm | |
| PLAT: aarch64 | |
| INTERFACE64: '0' | |
| MB_ML_VER: '2014' | |
| - os: ubuntu-24.04-arm | |
| PLAT: aarch64 | |
| INTERFACE64: '1' | |
| MB_ML_VER: '2014' | |
| - os: ubuntu-24.04-arm | |
| PLAT: aarch64 | |
| INTERFACE64: '0' | |
| MB_ML_LIBC: musllinux | |
| MB_ML_VER: _1_2 | |
| - os: ubuntu-24.04-arm | |
| PLAT: aarch64 | |
| INTERFACE64: '1' | |
| MB_ML_LIBC: musllinux | |
| MB_ML_VER: _1_2 | |
| exclude: | |
| - PLAT: i686 | |
| os: macos-13 | |
| - PLAT: i686 | |
| INTERFACE64: '1' | |
| env: | |
| NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} | |
| MB_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }} | |
| MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }} | |
| MB_ML_VER: ${{ matrix.MB_ML_VER }} | |
| INTERFACE64: ${{ matrix.INTERFACE64 }} | |
| BUILD_DIR: ${{ github.workspace }} | |
| PLAT: ${{ matrix.PLAT }} | |
| steps: | |
| - uses: actions/checkout@v4.1.1 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.9 | |
| - name: Set extra env | |
| run: | | |
| echo "DOCKER_TEST_IMAGE=$(echo multibuild/xenial_${{ matrix.PLAT}})" >> $GITHUB_ENV; | |
| - name: Setup clang from homebrew | |
| if: ${{ matrix.os == 'macos-13' }} | |
| run: | | |
| brew reinstall gcc | |
| brew install coreutils | |
| brew install llvm | |
| ls /usr/local/Cellar/gcc | |
| echo "/usr/local/Cellar/gcc/14.2.0_1/bin" >>$GITHUB_PATH | |
| echo "CC=/usr/local/Cellar/gcc/14.2.0_1/bin/gcc-14" >> $GITHUB_ENV; | |
| echo "RANLIB=/usr/bin/ranlib" >> $GITHUB_ENV; | |
| - name: Print some Environment variable | |
| run: | | |
| echo "PLAT: ${PLAT}" | |
| echo "DOCKER_TEST_IMAGE: ${DOCKER_TEST_IMAGE}" | |
| - name: Install VirtualEnv | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install virtualenv | |
| - name: Build OpenBLAS | |
| run: | | |
| set -xeo pipefail | |
| source tools/build_steps.sh | |
| echo "------ BEFORE BUILD ---------" | |
| before_build | |
| if [[ "$NIGHTLY" = "true" ]]; then | |
| echo "------ CLEAN CODE --------" | |
| clean_code $REPO_DIR develop | |
| echo "------ BUILD LIB --------" | |
| build_lib "$PLAT" "$INTERFACE64" "1" | |
| else | |
| echo "------ CLEAN CODE --------" | |
| clean_code $REPO_DIR $OPENBLAS_COMMIT | |
| echo "------ BUILD LIB --------" | |
| build_lib "$PLAT" "$INTERFACE64" "0" | |
| fi | |
| # - name: Setup tmate session | |
| # if: ${{ failure() }} | |
| # uses: mxschmitt/action-tmate@v3 | |
| # with: | |
| # limit-access-to-actor: true | |
| - name: Build and test wheel | |
| run: | | |
| if [[ "$NIGHTLY" = "true" ]]; then | |
| # Set the pyproject.toml version: convert v0.3.24-30-g138ed79f to 0.3.34.30 | |
| version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g") | |
| sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml | |
| fi | |
| if [ "macos-13" == "${{ matrix.os }}" ]; then | |
| source tools/build_wheel.sh | |
| else | |
| libc=${MB_ML_LIBC:-manylinux} | |
| docker_image=quay.io/pypa/${libc}${MB_ML_VER}_${PLAT} | |
| docker run --rm -e INTERFACE64="${INTERFACE64}" \ | |
| -e MB_ML_LIBC="${MB_ML_LIBC}" \ | |
| -v $(pwd):/openblas $docker_image \ | |
| /bin/bash -xe /openblas/tools/build_wheel.sh | |
| sudo chmod -R a+w dist | |
| fi | |
| - uses: actions/upload-artifact@v4.3.0 | |
| with: | |
| name: wheels-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }} | |
| path: dist/scipy_openblas*.whl | |
| - uses: actions/upload-artifact@v4.3.0 | |
| with: | |
| name: openblas-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }} | |
| path: libs/openblas*.tar.gz | |
| - name: install micromamba | |
| uses: mamba-org/setup-micromamba@b09ef9b599704322748535812ca03efb2625677b | |
| with: | |
| # for installation of anaconda-client, required for upload to | |
| # anaconda.org | |
| # Note that this step is *after* specific pythons have been used to | |
| # build and test the wheel | |
| # for installation of anaconda-client, for upload to anaconda.org | |
| # environment will be activated after creation, and in future bash steps | |
| init-shell: bash | |
| environment-name: upload-env | |
| create-args: >- | |
| anaconda-client | |
| - name: Upload | |
| # see https://github.com/marketplace/actions/setup-miniconda for why | |
| # `-el {0}` is required. | |
| shell: bash -el {0} | |
| env: | |
| ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} | |
| run: | | |
| source tools/upload_to_anaconda_staging.sh | |
| upload_wheels |