From 191541d61064643603bc35bd53b6310a1b1a8b4c Mon Sep 17 00:00:00 2001 From: Rob Davis Date: Fri, 13 Sep 2024 11:54:45 +0100 Subject: [PATCH] force x86_64 hardware --- .github/workflows/test_pr.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index cc8874ab..dbe3698d 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -37,43 +37,41 @@ jobs: strategy: matrix: python-version: ["3.11"] - os: [macos-13] + os: [macos-latest, ubuntu-latest] steps: - uses: actions/checkout@v3 with: submodules: true + + - name: Set up Rosetta 2 (macOS only) + run: | + softwareupdate --install-rosetta --agree-to-license + if: ${{ runner.os == 'macOS' }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: "pip" # caching pip dependencies - - name: Install MacOS dependencies - run: | - brew install libomp - if: ${{ contains(matrix.os, 'macos') }} - - name: Set libomp environment variables (macOS only) - run: | - export LDFLAGS="-L/opt/homebrew/opt/libomp/lib" - export CPPFLAGS="-I/opt/homebrew/opt/libomp/include" - export DYLD_LIBRARY_PATH="/opt/homebrew/opt/libomp/lib:$DYLD_LIBRARY_PATH" - echo "DYLD_LIBRARY_PATH set to $DYLD_LIBRARY_PATH" - if: ${{ contains(matrix.os, 'macos') }} + architecture: 'x64' # Force x86_64 architecture + cache: "pip" + - name: Install dependencies run: | python -m pip install -U pip pip install -r prereq.txt pip install pytest-timeout - - name: Set environment variables for MNIST - run: echo "MNIST_DATA_DIR=${{ github.workspace }}/mnist_data" >> $GITHUB_ENV + - name: Dump GitHub Action environment run: | echo "OS: $(uname -a)" python --version + pip freeze + - name: Test Core run: | pip install .[testing] pip freeze - pytest -vvvsx --timeout=300 --timeout-method=thread -m "not slow" --durations=50 + pytest -vvvsx --timeout=1000 --timeout-method=thread -m "not slow" --durations=50 - name: Test GOGGLE run: | pip install .[testing,goggle]