-
Notifications
You must be signed in to change notification settings - Fork 62
45 lines (42 loc) · 1.76 KB
/
compile_openblas_linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Compile OpenBLAS on Linux
run-name: Compile OpenBLAS on Linux - ${{ github.sha }}
on: workflow_dispatch
jobs:
compile_openblas:
strategy:
matrix:
arch:
- [x86_64, manylinux2014_x86_64, HASWELL, amd64]
- [aarch64, manylinux2014_aarch64, ARMV8, arm64]
name: ${{ matrix.arch[0] }}
runs-on: ubuntu-latest
timeout-minutes: 600 # NOTE: need this to compile the arm64 version
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: ${{ matrix.arch[3] }}
- name: Compile OpenBLAS
run: |
curl -L -o OpenBLAS-0.3.27.tar.gz https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.27/OpenBLAS-0.3.27.tar.gz
tar -xzf OpenBLAS-0.3.27.tar.gz
docker create --name=openblas_${{ matrix.arch[0] }} -i --volume=${GITHUB_WORKSPACE}:/host quay.io/pypa/${{ matrix.arch[1] }}:latest /bin/bash
docker start openblas_${{ matrix.arch[0] }}
docker exec -i openblas_${{ matrix.arch[0] }} sh -c "make -C /host/OpenBLAS-0.3.27 TARGET=${{ matrix.arch[2] }} DYNAMIC_ARCH=1"
docker exec -i openblas_${{ matrix.arch[0] }} sh -c "make install -C /host/OpenBLAS-0.3.27 PREFIX=/host/OpenBLAS"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: OpenBLAS_linux_${{ matrix.arch[0] }}
path: ./OpenBLAS
if-no-files-found: error
run_id:
name: Create/Update OPENBLAS_LINUX_ARTIFACTS_RUN_ID secret
runs-on: ubuntu-latest
needs: [compile_openblas]
steps:
- uses: actions/checkout@v4
- run: |
gh secret set OPENBLAS_LINUX_ARTIFACTS_RUN_ID --body ${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.GH_PAT }}