From 764edd9a59971ae916b3013f1cb9ab6840ff7a38 Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Tue, 3 Dec 2024 10:59:21 +0800 Subject: [PATCH] :poop: Enable pytest on macos --- .github/workflows/main.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6690d8e..aa9b8e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,9 +27,8 @@ jobs: include: - runs-on: ubuntu-latest shell: bash - # SystemError: PyDescr_NewMember used with Py_RELATIVE_OFFSET - # - runs-on: macos-latest - # shell: bash + - runs-on: macos-latest + shell: bash - runs-on: windows-latest shell: msys2 runs-on: ${{matrix.runs-on}} @@ -49,17 +48,25 @@ jobs: run: | sudo apt-get -y update sudo apt-get -y install librime-dev - - name: Install dependencies - if: runner.os == 'macOS' - run: | - brew tap tonyfettes/homebrew-rime - brew install librime - name: Install dependencies if: runner.os == 'Windows' run: | pacman -Sy --noconfirm mingw-w64-x86_64-pkg-config \ mingw-w64-x86_64-librime mingw-w64-x86_64-python-pip \ mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc + - uses: cachix/install-nix-action@v24 + if: runner.os == 'macOS' + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + extra_nix_config: | + experimental-features = nix-command flakes + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Install dependencies + if: runner.os == 'macOS' + run: | + nix-channel --update + nix-env -iA nixpkgs.librime + export PKG_CONFIG_PATH="$HOME/.nix-profile" - name: Test run: | pip install .[dev]