From 8dbc4ec26eb4fc7c0d70f00b6cf7d930f6a56165 Mon Sep 17 00:00:00 2001 From: "jui-wen.chen" Date: Thu, 31 Jul 2025 10:12:12 +0200 Subject: [PATCH 1/3] updated CI runner - use github-hosted runners - not specified cache dir in macos --- .github/actions/setup_rye/action.yml | 9 +++++---- .github/workflows/ci.yml | 24 ++++++++++-------------- .github/workflows/gh_pages.yml | 4 ++-- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/actions/setup_rye/action.yml b/.github/actions/setup_rye/action.yml index e370827..1bb56a6 100644 --- a/.github/actions/setup_rye/action.yml +++ b/.github/actions/setup_rye/action.yml @@ -14,10 +14,11 @@ runs: run: | echo "MATURIN_PEP517_ARGS=--zig" >> $GITHUB_ENV shell: bash - - name: Set UV_CACHE_DIR for MacOS - if: runner.os == 'macOS' - run: echo "UV_CACHE_DIR=/Users/gh-runner/Library/Caches/uv" >> $GITHUB_ENV - shell: bash + # The cache dir cannot be created in MacOs in GitHub hosted runner because of lack of permission + # - name: Set UV_CACHE_DIR for MacOS + # if: runner.os == 'macOS' + # run: echo "UV_CACHE_DIR=/Users/gh-runner/Library/Caches/uv" >> $GITHUB_ENV + # shell: bash - name: Set UV_CACHE_DIR for Windows if: runner.os == 'Windows' run: echo "UV_CACHE_DIR=C:\\Users\\useblocks\\AppData\\Local\\uv-${{ runner.name }}" >> $env:GITHUB_ENV diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1e0f8f..814fd9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ permissions: jobs: pre-commit: name: Pre-commit - runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -33,7 +33,7 @@ jobs: mypy: name: MyPy - runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,21 +41,17 @@ jobs: - run: rye run mypy:all pytest: - name: Pytest (${{ matrix.os }}-${{ matrix.arch }}) + name: Pytest (${{ matrix.os }}) strategy: fail-fast: false matrix: include: - - os: linux - arch: x64 - - os: linux - arch: arm64 - - os: windows - arch: x64 - - os: macos - arch: arm64 + - os: ubuntu-latest + - os: ubuntu-24.04-arm + - os: windows-latest + - os: macos-latest - runs-on: [self-hosted, "${{ matrix.os }}", "${{ matrix.arch }}"] + runs-on: ["${{ matrix.os }}"] steps: - uses: actions/checkout@v4 @@ -64,7 +60,7 @@ jobs: docs: name: Documentation build - runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -84,7 +80,7 @@ jobs: - pytest - docs - runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml index 62ab44c..3f1ab4e 100644 --- a/.github/workflows/gh_pages.yml +++ b/.github/workflows/gh_pages.yml @@ -25,7 +25,7 @@ concurrency: jobs: build: name: Build - runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Pages @@ -45,7 +45,7 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} needs: build - runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-latest name: Deploy steps: - name: Deploy to GitHub Pages From 5dd434041c3e5ee221fc86c31fec072e7a7e3c25 Mon Sep 17 00:00:00 2001 From: "jui-wen.chen" Date: Fri, 1 Aug 2025 09:45:08 +0200 Subject: [PATCH 2/3] removed commented config --- .github/actions/setup_rye/action.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/actions/setup_rye/action.yml b/.github/actions/setup_rye/action.yml index 1bb56a6..4c737a0 100644 --- a/.github/actions/setup_rye/action.yml +++ b/.github/actions/setup_rye/action.yml @@ -14,11 +14,6 @@ runs: run: | echo "MATURIN_PEP517_ARGS=--zig" >> $GITHUB_ENV shell: bash - # The cache dir cannot be created in MacOs in GitHub hosted runner because of lack of permission - # - name: Set UV_CACHE_DIR for MacOS - # if: runner.os == 'macOS' - # run: echo "UV_CACHE_DIR=/Users/gh-runner/Library/Caches/uv" >> $GITHUB_ENV - # shell: bash - name: Set UV_CACHE_DIR for Windows if: runner.os == 'Windows' run: echo "UV_CACHE_DIR=C:\\Users\\useblocks\\AppData\\Local\\uv-${{ runner.name }}" >> $env:GITHUB_ENV From e7e60baf9d3603b036d06aa27f5c3449a8122211 Mon Sep 17 00:00:00 2001 From: "jui-wen.chen" Date: Fri, 1 Aug 2025 09:58:25 +0200 Subject: [PATCH 3/3] removed cache config --- .github/actions/setup_rye/action.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/actions/setup_rye/action.yml b/.github/actions/setup_rye/action.yml index 4c737a0..83ea135 100644 --- a/.github/actions/setup_rye/action.yml +++ b/.github/actions/setup_rye/action.yml @@ -2,22 +2,6 @@ name: Set up rye runs: using: 'composite' steps: - # rye uses uv under the hood, so we need to set the cache directory correctly, based on the OS - - name: Set UV_CACHE_DIR for Linux - if: runner.os == 'Linux' - run: | - echo "UV_CACHE_DIR=/home/runner/.cache/uv" >> $GITHUB_ENV - shell: bash - - name: Set MATURIN_PEP517_ARGS for Linux - if: runner.os == 'Linux' - # make sure we always use zig, to get manylinux2014 compatible rust binaries - run: | - echo "MATURIN_PEP517_ARGS=--zig" >> $GITHUB_ENV - shell: bash - - name: Set UV_CACHE_DIR for Windows - if: runner.os == 'Windows' - run: echo "UV_CACHE_DIR=C:\\Users\\useblocks\\AppData\\Local\\uv-${{ runner.name }}" >> $env:GITHUB_ENV - shell: pwsh # now install rye and sync the dependencies - uses: eifinger/setup-rye@v4 with: