introduce recipe #118
This file contains 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: CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
cache: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: actions/cache@v4 | |
id: restore-openblas-cache | |
with: | |
key: openblas | |
path: /opt/OpenBLAS | |
- name: Install OpenBLAS if not restored | |
if: steps.restore-openblas-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p $HOME/tmp && cd $HOME/tmp | |
git clone https://github.com/OpenMathLib/OpenBLAS.git && cd OpenBLAS | |
make && make install | |
- run: python -m venv .env && source .env/bin/activate && pip install numpy | |
# For flakiness test, run test multiple times | |
- run: source .env/bin/activate && go clean -testcache && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/OpenBLAS/lib go test ./... | |
- run: source .env/bin/activate && go clean -testcache && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/OpenBLAS/lib go test ./... | |
- run: source .env/bin/activate && go clean -testcache && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/OpenBLAS/lib go test ./... |