diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bf6e4e6..fcee61f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,215 +3,6 @@ on: push: branches: [ main, dev ] jobs: - build-win64-release: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.7.5 - cache: pip - architecture: x64 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r ./requirements_win.txt - - name: Run packing - run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack.py ./OlivOS/hook.py - sudo python scripts.py build - env: - OLIVOS_ENV_PACK: "1" - - name: Run artifact - run: | - mkdir OlivOS-Win - cp ./dist/main.exe ./OlivOS-win/OlivOS.exe - - name: Packing OlivOS-Win - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-old-origin - path: ./OlivOS-Win - - name: Ready for Packing - #run: | - # mkdir ./OlivOS-Win/lib - # curl -L https://github.com/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_windows_amd64.exe -o ./OlivOS-Win/lib/go-cqhttp.exe - # curl -L https://github.com/onebot-walle/walle-q/releases/latest/download/walle-q-i686-windows-gnu.exe -o ./OlivOS-Win/lib/walle-q.exe - run: | - mkdir ./OlivOS-Win/lib - - name: Packing OlivOS-Win-with-lib - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-old - path: ./OlivOS-Win - - build-win64-debug: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.7.5 - cache: pip - architecture: x64 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r ./requirements_win.txt - - name: Run packing - run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py - sudo python scripts.py build debug - env: - OLIVOS_ENV_PACK: "1" - OLIVOS_ENV_DEBUG: "1" - - name: Run artifact - run: | - mkdir OlivOS-Win - cp ./dist/main.exe ./OlivOS-win/OlivOS_debug.exe - - name: Packing OlivOS-Win - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-64-old-debug-origin - path: ./OlivOS-Win - - name: Ready for Packing - #run: | - # mkdir ./OlivOS-Win/lib - # curl -L https://github.com/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_windows_amd64.exe -o ./OlivOS-Win/lib/go-cqhttp.exe - # curl -L https://github.com/onebot-walle/walle-q/releases/latest/download/walle-q-i686-windows-gnu.exe -o ./OlivOS-Win/lib/walle-q.exe - run: | - mkdir ./OlivOS-Win/lib - - name: Packing OlivOS-Win-with-lib - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-64-old-debug - path: ./OlivOS-Win - - build-win32-release: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.7.5 - cache: pip - architecture: x86 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r ./requirements_win.txt - - name: Run packing - run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack.py ./OlivOS/hook.py - sudo python scripts.py build - env: - OLIVOS_ENV_PACK: "1" - - - name: Run artifact - run: | - mkdir OlivOS-Win - cp ./dist/main.exe ./OlivOS-win/OlivOS.exe - - name: Packing OlivOS-Win - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-32-old-origin - path: ./OlivOS-Win - - name: Ready for Packing - #run: | - # mkdir ./OlivOS-Win/lib - # curl -L https://github.com/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_windows_386.exe -o ./OlivOS-Win/lib/go-cqhttp.exe - # curl -L https://github.com/onebot-walle/walle-q/releases/latest/download/walle-q-i686-windows-gnu.exe -o ./OlivOS-Win/lib/walle-q.exe - run: | - mkdir ./OlivOS-Win/lib - - name: Packing OlivOS-Win-with-lib - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-32-old - path: ./OlivOS-Win - - build-win32-debug: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.7.5 - cache: pip - architecture: x86 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r ./requirements_win.txt - - name: Run packing - run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py - sudo python scripts.py build debug - env: - OLIVOS_ENV_PACK: "1" - OLIVOS_ENV_DEBUG: "1" - - - name: Run artifact - run: | - mkdir OlivOS-Win - cp ./dist/main.exe ./OlivOS-win/OlivOS_debug.exe - - name: Packing OlivOS-Win - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-32-old-debug-origin - path: ./OlivOS-Win - - name: Ready for Packing - #run: | - # mkdir ./OlivOS-Win/lib - # curl -L https://github.com/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_windows_386.exe -o ./OlivOS-Win/lib/go-cqhttp.exe - # curl -L https://github.com/onebot-walle/walle-q/releases/latest/download/walle-q-i686-windows-gnu.exe -o ./OlivOS-Win/lib/walle-q.exe - run: | - mkdir ./OlivOS-Win/lib - - name: Packing OlivOS-Win-with-lib - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-32-old-debug - path: ./OlivOS-Win - - build-linux-release: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.7.5 - cache: pip - architecture: x64 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r ./requirements.txt - - name: Run packing - run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py - sudo python scripts.py build - env: - OLIVOS_ENV_PACK: "1" - OLIVOS_ENV_DEBUG: "1" - - - name: Run artifact - run: | - mkdir OlivOS-PKG - cp ./dist/main ./OlivOS-PKG/OlivOS - - name: Packing OlivOS-PKG - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Linux-old - path: ./OlivOS-PKG - build-win64-new-release: runs-on: windows-latest steps: @@ -224,6 +15,9 @@ jobs: run: | # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py # cp ./OlivOS/hook_pack.py ./OlivOS/hook.py + uv v + uv sync --all-extras --dev --all-groups + uv build source .venv/bin/activate uv run scripts.py build env: @@ -252,124 +46,6 @@ jobs: name: OlivOS-Win path: ./OlivOS-Win - build-win64-new-debug: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup Python - uses: ./.github/actions/setup-python - - - name: Run packing - run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py - source .venv/bin/activate - uv run scripts.py build debug - env: - OLIVOS_ENV_PACK: "1" - OLIVOS_ENV_DEBUG: "1" - - - name: Run artifact - run: | - mkdir OlivOS-Win - cp ./dist/OlivOS.exe ./OlivOS-win/OlivOS_debug.exe - - name: Packing OlivOS-Win - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-64-debug-origin - path: ./OlivOS-Win - - name: Ready for Packing - #run: | - # mkdir ./OlivOS-Win/lib - # curl -L https://github.com/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_windows_amd64.exe -o ./OlivOS-Win/lib/go-cqhttp.exe - # curl -L https://github.com/onebot-walle/walle-q/releases/latest/download/walle-q-i686-windows-gnu.exe -o ./OlivOS-Win/lib/walle-q.exe - run: | - mkdir ./OlivOS-Win/lib - - name: Packing OlivOS-Win-with-lib - uses: actions/upload-artifact@v3 - with: - name: OlivOS-Win-64-debug - path: ./OlivOS-Win - - #build-win32-new-release: - # runs-on: windows-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Setup Python - # uses: actions/setup-python@v4 - # with: - # python-version: 3.11.0 - # cache: pip - # architecture: x86 - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install -r ./requirements310_win.txt - # - name: Run packing - # run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack.py ./OlivOS/hook.py - # pyinstaller ./main.spec - # - name: Run artifact - # run: | - # mkdir OlivOS-Win - # cp ./dist/main.exe ./OlivOS-win/OlivOS.exe - # - name: Packing OlivOS-Win - # uses: actions/upload-artifact@v3 - # with: - # name: OlivOS-Win-32-origin - # path: ./OlivOS-Win - # - name: Ready for Packing - # run: | - # mkdir ./OlivOS-Win/lib - # curl -L https://github.com/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_windows_386.exe -o ./OlivOS-Win/lib/go-cqhttp.exe - # curl -L https://github.com/onebot-walle/walle-q/releases/latest/download/walle-q-i686-windows-gnu.exe -o ./OlivOS-Win/lib/walle-q.exe - # - name: Packing OlivOS-Win-with-lib - # uses: actions/upload-artifact@v3 - # with: - # name: OlivOS-Win-32 - # path: ./OlivOS-Win - - #build-win32-new-debug: - # runs-on: windows-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Setup Python - # uses: actions/setup-python@v4 - # with: - # python-version: 3.11.0 - # cache: pip - # architecture: x86 - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install -r ./requirements310_win.txt - # - name: Run packing - # run: | - # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py - # cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py - # pyinstaller ./main_debug.spec - # - name: Run artifact - # run: | - # mkdir OlivOS-Win - # cp ./dist/main.exe ./OlivOS-win/OlivOS_debug.exe - # - name: Packing OlivOS-Win - # uses: actions/upload-artifact@v3 - # with: - # name: OlivOS-Win-32-debug-origin - # path: ./OlivOS-Win - # - name: Ready for Packing - # run: | - # mkdir ./OlivOS-Win/lib - # curl -L https://github.com/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_windows_386.exe -o ./OlivOS-Win/lib/go-cqhttp.exe - # curl -L https://github.com/onebot-walle/walle-q/releases/latest/download/walle-q-i686-windows-gnu.exe -o ./OlivOS-Win/lib/walle-q.exe - # - name: Packing OlivOS-Win-with-lib - # uses: actions/upload-artifact@v3 - # with: - # name: OlivOS-Win-32-debug - # path: ./OlivOS-Win - build-linux-new-release: runs-on: ubuntu-latest steps: @@ -382,6 +58,9 @@ jobs: run: | # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py # cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py + uv v + uv sync --all-extras --dev --all-groups + uv build source .venv/bin/activate uv run scripts.py build env: @@ -412,7 +91,8 @@ jobs: # cp ./OlivOS/hook.py ./OlivOS/hook_bak.py # cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py uv v - uv sync --all-groups --extra + uv sync --all-extras --dev --all-groups + uv build source .venv/bin/activate uv run scripts.py build env: