From b737fff4dc3229a11b8d0b5ac3f6f093d18b4b1f Mon Sep 17 00:00:00 2001 From: Askeladd <1351914167@qq.com> Date: Fri, 15 Aug 2025 16:52:50 +0800 Subject: [PATCH 1/2] add workflow --- .DS_Store | Bin 6148 -> 6148 bytes .github/.DS_Store | Bin 0 -> 6148 bytes .github/workflows/auto-wheel-upload.yml | 63 ++++++++ .github/workflows/issueclose.yml | 26 ++++ .github/workflows/labelcreate.yml | 44 ++++++ .github/workflows/postprocessing.yml | 142 ++++++++++++++++++ .github/workflows/verification.yml | 120 +++++++++++++++ numpy/.github/.DS_Store | Bin 0 -> 6148 bytes numpy/.github/workflows/auto-wheel-upload.yml | 63 ++++++++ numpy/.github/workflows/issueclose.yml | 26 ++++ numpy/.github/workflows/labelcreate.yml | 44 ++++++ numpy/.github/workflows/postprocessing.yml | 142 ++++++++++++++++++ numpy/.github/workflows/verification.yml | 120 +++++++++++++++ 13 files changed, 790 insertions(+) create mode 100644 .github/.DS_Store create mode 100644 .github/workflows/auto-wheel-upload.yml create mode 100644 .github/workflows/issueclose.yml create mode 100644 .github/workflows/labelcreate.yml create mode 100644 .github/workflows/postprocessing.yml create mode 100644 .github/workflows/verification.yml create mode 100644 numpy/.github/.DS_Store create mode 100644 numpy/.github/workflows/auto-wheel-upload.yml create mode 100644 numpy/.github/workflows/issueclose.yml create mode 100644 numpy/.github/workflows/labelcreate.yml create mode 100644 numpy/.github/workflows/postprocessing.yml create mode 100644 numpy/.github/workflows/verification.yml diff --git a/.DS_Store b/.DS_Store index 074e8ff8c75a07d0a3a786417e8da83682e40e8a..e4648fdc7cc11329445cae008b218dd8398f9bbb 100644 GIT binary patch delta 78 zcmZoMXfc=|#>B`mu~2NHo+2aj#DLw5%#(Ro5;rrmu`q2`;9zH&*wDY3or9kPsA{ty b$9Lw*{34bD3_!rhz`z8hSvE(AtYHQK#-$H| delta 481 zcmZoMXfc=|#>B!ku~2NHo+2aH#DLw4H!w0Ya!ux8Osr>R$YUsF$Ym&CsPxRqPfp6o zPhwzT5MW?n>;}?$|G@yrVqid0nN(g}09CmosURn_xWvHV8Y2@k3o9EtJ109gdu(t< zetB?7Vo7PSQ({pxh!>KdpOXY*Cnkkurk2MGh}1jh=anR8=A{;ab!4Wb0@cKXXXd5k zmpkQ`=A{&aH3vf^I5{~u;{_zDt4++!brcLO%xiTNsx1vIbrej@3~FmRIYgE9t%KsT zb8_?YyTFcSU}S{Q47^YpMuEJ?%1{sYeNMVzaB_Zb0Zbk&4VTT$cX5IGnB()Oi;CaW zjys~ONFku2AOq6|F+}i}1sCPzjY7V84v;HA}iGN3D zcDJIm9u+GyF#9IE^ODWmu$ut@(d>8D04e}bMkg#d*i0}QCm*wd?U_Lo`X1L1fr1Q@ z!)PpX_la1wU2c4cv2#i<|0-JT|doi3)FpN4Tq zWlhzOJBj9cX25aEPP4%Xx(xPiIH;5x>!cY+nRoD_k7&`V#o99~04H`NKTYL!n zWML~5p`VWTmpUDUYmi%3fED>EAT%R5XF|)YT~=uvvuq( w>8zFLm*`}ammB<`V4#m;%%!8aimna&B?XAC#oQqFpz)7@mVp~q;8zuR2if&oR{#J2 literal 0 HcmV?d00001 diff --git a/.github/workflows/auto-wheel-upload.yml b/.github/workflows/auto-wheel-upload.yml new file mode 100644 index 0000000..f571395 --- /dev/null +++ b/.github/workflows/auto-wheel-upload.yml @@ -0,0 +1,63 @@ +name: Auto Wheel Upload + +on: + pull_request: + types: [opened, edited, synchronize] + paths: + - 'llpkg/**' # 只监听 llpkg 文件夹的变化 + +jobs: + process-wheel-request: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + issues: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + token: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Install llpkgstore + run: | + go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + + - name: Process wheel request + env: + GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + TARGET_REPO_OWNER: Bigdata-shiyang + TARGET_REPO_NAME: llpkg # 改为 llpkg + run: | + echo "Starting wheel upload process for PR #${{ github.event.number }}" + llpkgstore wheel-upload ${{ github.event.number }} + + - name: Add success label + if: success() + env: + GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + run: | + echo "Adding success label to PR #${{ github.event.number }}" + curl -X POST \ + -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ + -d '{"labels":["wheel-added"]}' + + - name: Add failure label + if: failure() + env: + GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + run: | + echo "Adding failure label to PR #${{ github.event.number }}" + curl -X POST \ + -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ + -d '{"labels":["wheel-failed"]}' \ No newline at end of file diff --git a/.github/workflows/issueclose.yml b/.github/workflows/issueclose.yml new file mode 100644 index 0000000..a5010ee --- /dev/null +++ b/.github/workflows/issueclose.yml @@ -0,0 +1,26 @@ +name: Clean unused branch + + +on: + issues: + types: [closed] + + +jobs: + clean-resource: + runs-on: ubuntu-latest + # when issue has no label, it's safe to skip. + if: contains(github.event.issue.labels[0].name, 'branch:release-branch.') + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Run cleaner process + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore issueclose diff --git a/.github/workflows/labelcreate.yml b/.github/workflows/labelcreate.yml new file mode 100644 index 0000000..3ab10d4 --- /dev/null +++ b/.github/workflows/labelcreate.yml @@ -0,0 +1,44 @@ +name: Legacy version maintenance + + +# label trigger +on: + label: + types: [created] + + + +jobs: + maintenance: + runs-on: ubuntu-latest + if: startsWith(github.event.label.name, 'branch:release-branch.') + steps: + - name: Checkout to website + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Checkout + uses: actions/checkout@v4 + with: + ref: main + path: .main + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Copy llpkgstore.json to root + continue-on-error: true + run: | + # ignore error + ls .website .website/public + cp .website/public/llpkgstore.json .main + rm -rf .website + - name: Run maintenance process + working-directory: .main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore labelcreate -l "${{ github.event.label.name }}" diff --git a/.github/workflows/postprocessing.yml b/.github/workflows/postprocessing.yml new file mode 100644 index 0000000..f6f8a7c --- /dev/null +++ b/.github/workflows/postprocessing.yml @@ -0,0 +1,142 @@ +name: Post-processing + +# don't limit to main branch +# consider maintenance branch +on: + push: + branches: + - 'release-branch.**' + - main + paths-ignore: + - '.github/**' + - LICENSE + - README.md + - '.gitignore' + +concurrency: + group: ${{ github.head_ref || github.ref_name }} + cancel-in-progress: true + +jobs: + release-binary-files: + strategy: + matrix: + os: + - macos-13 + - macos-latest + - ubuntu-24.04 + - ubuntu-24.04-arm + runs-on: ${{matrix.os}} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Install dependencies + if: startsWith(matrix.os, 'macos') + run: | + brew update + brew install cmake conan cjson + - name: Install dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install -y cmake python3 python3-pip pkg-config + python3 -m pip install conan + - name: Set up Conan + run: conan profile detect + - name: Run release process + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore release + - name: Upload binary file to artifact + uses: actions/upload-artifact@v4 + with: + name: ${{env.BIN_FILENAME}} + path: ${{env.BIN_PATH}} + retention-days: 1 + post-processing: + runs-on: ubuntu-latest + needs: [release-binary-files] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: main + path: .main + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Checkout to website + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Copy llpkgstore.json to root + continue-on-error: true + run: | + ls .website .website/public + cp .website/public/llpkgstore.json .main + rm -rf .website + - name: Run post-processing process + working-directory: .main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore postprocessing + - name: Checkout website branch + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Move llpkgstore.json to website + run: mv .main/llpkgstore.json .website/public + - name: Commit and push changes + working-directory: .website + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add public/llpkgstore.json + git commit -m "Update llpkgstore.json" + git push + build-and-upload: + runs-on: ubuntu-latest + needs: [post-processing] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: website + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 23.8.0 + - run: corepack enable + - name: Install Dependencies + uses: borales/actions-yarn@v4 + with: + cmd: install + - name: Build + uses: borales/actions-yarn@v4 + with: + cmd: build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'dist' + deploy: + needs: build-and-upload + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml new file mode 100644 index 0000000..4e7efe3 --- /dev/null +++ b/.github/workflows/verification.yml @@ -0,0 +1,120 @@ +name: Verify Go Module + +# don't limit to main branch +# consider maintenance branch +on: + pull_request: + branches: + - 'release-branch.**' + - main + paths-ignore: + - '.github/**' + - LICENSE + - README.md + - '.gitignore' + +jobs: + llcppg-verification: + name: Verify Go Module + strategy: + matrix: + os: + - macos-13 + - macos-latest + - ubuntu-24.04 + - ubuntu-24.04-arm + llvm: [19] + llgo: [e68355d94f9f9ec17caae6e0d397bd55f8c5ec33] + llcppg: [v0.7.3] + + runs-on: ${{matrix.os}} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check out LLGo + uses: actions/checkout@v4 + with: + repository: 'goplus/llgo' + path: .llgo + ref: ${{matrix.llgo}} + - name: Check out LLCppg + uses: actions/checkout@v4 + with: + repository: 'goplus/llcppg' + path: .llcppg + ref: ${{matrix.llcppg}} + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: | + go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Install dependencies + if: startsWith(matrix.os, 'macos') + run: | + brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi libuv cmake conan lld@${{matrix.llvm}} + brew link --force libffi + echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH + echo "$(brew --prefix lld@${{matrix.llvm}})/bin" >> $GITHUB_PATH + - name: Install dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{matrix.llvm}} main" | sudo tee /etc/apt/sources.list.d/llvm.list + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get install -y llvm-${{matrix.llvm}}-dev \ + clang-${{matrix.llvm}} \ + libclang-${{matrix.llvm}}-dev \ + lld-${{matrix.llvm}} \ + libunwind-${{matrix.llvm}}-dev \ + libc++-${{matrix.llvm}}-dev \ + pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libuv1-dev + echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH + - name: Pre setup Conan + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt install -y python3 + python3 -m pip install conan + - name: Set up Conan + run: | + conan profile detect + - name: Setup LLGo + working-directory: .llgo + run: | + go install -v ./cmd/llgo/... + export LLGO_ROOT=$(pwd) + echo "LLGO_ROOT=$LLGO_ROOT" >> $GITHUB_ENV + # https://github.com/goplus/llgo/issues/1135 + echo "LLGO_RPATH_CHANGE=ON" >> $GITHUB_ENV + - name: Setup LLCppg + working-directory: .llcppg + run: | + llgo install ./_xtool/llcppsymg + llgo install ./_xtool/llcppsigfetch + go install github.com/goplus/llcppg/cmd/llcppcfg@${{matrix.llcppg}} + go install github.com/goplus/llcppg/cmd/gogensig@${{matrix.llcppg}} + go install github.com/goplus/llcppg/cmd/llcppg@${{matrix.llcppg}} + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + - name: Checkout to website + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Copy llpkgstore.json to root + continue-on-error: true + run: | + ls .website .website/public + cp .website/public/llpkgstore.json . + rm -rf .website + - name: Verification & Prebuilt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: llpkgstore verification + - name: Run demotest process + env: + LLPKG_PATH: ${{ env.LLPKG_PATH }} + run: llpkgstore demotest diff --git a/numpy/.github/.DS_Store b/numpy/.github/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b46d673a2c036e2a6c0aa3da7788eb388a9d044d GIT binary patch literal 6148 zcmeHKO-sW-5S^{nHi*!JLXQhxi`Ea+;w9F4@M=U4DmAfHgE1>jY7V84v;HA}iGN3D zcDJIm9u+GyF#9IE^ODWmu$ut@(d>8D04e}bMkg#d*i0}QCm*wd?U_Lo`X1L1fr1Q@ z!)PpX_la1wU2c4cv2#i<|0-JT|doi3)FpN4Tq zWlhzOJBj9cX25aEPP4%Xx(xPiIH;5x>!cY+nRoD_k7&`V#o99~04H`NKTYL!n zWML~5p`VWTmpUDUYmi%3fED>EAT%R5XF|)YT~=uvvuq( w>8zFLm*`}ammB<`V4#m;%%!8aimna&B?XAC#oQqFpz)7@mVp~q;8zuR2if&oR{#J2 literal 0 HcmV?d00001 diff --git a/numpy/.github/workflows/auto-wheel-upload.yml b/numpy/.github/workflows/auto-wheel-upload.yml new file mode 100644 index 0000000..f571395 --- /dev/null +++ b/numpy/.github/workflows/auto-wheel-upload.yml @@ -0,0 +1,63 @@ +name: Auto Wheel Upload + +on: + pull_request: + types: [opened, edited, synchronize] + paths: + - 'llpkg/**' # 只监听 llpkg 文件夹的变化 + +jobs: + process-wheel-request: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + issues: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + token: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Install llpkgstore + run: | + go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + + - name: Process wheel request + env: + GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + TARGET_REPO_OWNER: Bigdata-shiyang + TARGET_REPO_NAME: llpkg # 改为 llpkg + run: | + echo "Starting wheel upload process for PR #${{ github.event.number }}" + llpkgstore wheel-upload ${{ github.event.number }} + + - name: Add success label + if: success() + env: + GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + run: | + echo "Adding success label to PR #${{ github.event.number }}" + curl -X POST \ + -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ + -d '{"labels":["wheel-added"]}' + + - name: Add failure label + if: failure() + env: + GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} + run: | + echo "Adding failure label to PR #${{ github.event.number }}" + curl -X POST \ + -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ + -d '{"labels":["wheel-failed"]}' \ No newline at end of file diff --git a/numpy/.github/workflows/issueclose.yml b/numpy/.github/workflows/issueclose.yml new file mode 100644 index 0000000..a5010ee --- /dev/null +++ b/numpy/.github/workflows/issueclose.yml @@ -0,0 +1,26 @@ +name: Clean unused branch + + +on: + issues: + types: [closed] + + +jobs: + clean-resource: + runs-on: ubuntu-latest + # when issue has no label, it's safe to skip. + if: contains(github.event.issue.labels[0].name, 'branch:release-branch.') + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Run cleaner process + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore issueclose diff --git a/numpy/.github/workflows/labelcreate.yml b/numpy/.github/workflows/labelcreate.yml new file mode 100644 index 0000000..3ab10d4 --- /dev/null +++ b/numpy/.github/workflows/labelcreate.yml @@ -0,0 +1,44 @@ +name: Legacy version maintenance + + +# label trigger +on: + label: + types: [created] + + + +jobs: + maintenance: + runs-on: ubuntu-latest + if: startsWith(github.event.label.name, 'branch:release-branch.') + steps: + - name: Checkout to website + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Checkout + uses: actions/checkout@v4 + with: + ref: main + path: .main + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Copy llpkgstore.json to root + continue-on-error: true + run: | + # ignore error + ls .website .website/public + cp .website/public/llpkgstore.json .main + rm -rf .website + - name: Run maintenance process + working-directory: .main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore labelcreate -l "${{ github.event.label.name }}" diff --git a/numpy/.github/workflows/postprocessing.yml b/numpy/.github/workflows/postprocessing.yml new file mode 100644 index 0000000..f6f8a7c --- /dev/null +++ b/numpy/.github/workflows/postprocessing.yml @@ -0,0 +1,142 @@ +name: Post-processing + +# don't limit to main branch +# consider maintenance branch +on: + push: + branches: + - 'release-branch.**' + - main + paths-ignore: + - '.github/**' + - LICENSE + - README.md + - '.gitignore' + +concurrency: + group: ${{ github.head_ref || github.ref_name }} + cancel-in-progress: true + +jobs: + release-binary-files: + strategy: + matrix: + os: + - macos-13 + - macos-latest + - ubuntu-24.04 + - ubuntu-24.04-arm + runs-on: ${{matrix.os}} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Install dependencies + if: startsWith(matrix.os, 'macos') + run: | + brew update + brew install cmake conan cjson + - name: Install dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install -y cmake python3 python3-pip pkg-config + python3 -m pip install conan + - name: Set up Conan + run: conan profile detect + - name: Run release process + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore release + - name: Upload binary file to artifact + uses: actions/upload-artifact@v4 + with: + name: ${{env.BIN_FILENAME}} + path: ${{env.BIN_PATH}} + retention-days: 1 + post-processing: + runs-on: ubuntu-latest + needs: [release-binary-files] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: main + path: .main + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Checkout to website + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Copy llpkgstore.json to root + continue-on-error: true + run: | + ls .website .website/public + cp .website/public/llpkgstore.json .main + rm -rf .website + - name: Run post-processing process + working-directory: .main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: llpkgstore postprocessing + - name: Checkout website branch + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Move llpkgstore.json to website + run: mv .main/llpkgstore.json .website/public + - name: Commit and push changes + working-directory: .website + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add public/llpkgstore.json + git commit -m "Update llpkgstore.json" + git push + build-and-upload: + runs-on: ubuntu-latest + needs: [post-processing] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: website + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 23.8.0 + - run: corepack enable + - name: Install Dependencies + uses: borales/actions-yarn@v4 + with: + cmd: install + - name: Build + uses: borales/actions-yarn@v4 + with: + cmd: build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'dist' + deploy: + needs: build-and-upload + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/numpy/.github/workflows/verification.yml b/numpy/.github/workflows/verification.yml new file mode 100644 index 0000000..4e7efe3 --- /dev/null +++ b/numpy/.github/workflows/verification.yml @@ -0,0 +1,120 @@ +name: Verify Go Module + +# don't limit to main branch +# consider maintenance branch +on: + pull_request: + branches: + - 'release-branch.**' + - main + paths-ignore: + - '.github/**' + - LICENSE + - README.md + - '.gitignore' + +jobs: + llcppg-verification: + name: Verify Go Module + strategy: + matrix: + os: + - macos-13 + - macos-latest + - ubuntu-24.04 + - ubuntu-24.04-arm + llvm: [19] + llgo: [e68355d94f9f9ec17caae6e0d397bd55f8c5ec33] + llcppg: [v0.7.3] + + runs-on: ${{matrix.os}} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check out LLGo + uses: actions/checkout@v4 + with: + repository: 'goplus/llgo' + path: .llgo + ref: ${{matrix.llgo}} + - name: Check out LLCppg + uses: actions/checkout@v4 + with: + repository: 'goplus/llcppg' + path: .llcppg + ref: ${{matrix.llcppg}} + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.23.x + - name: Set up Tool + run: | + go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest + - name: Install dependencies + if: startsWith(matrix.os, 'macos') + run: | + brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi libuv cmake conan lld@${{matrix.llvm}} + brew link --force libffi + echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH + echo "$(brew --prefix lld@${{matrix.llvm}})/bin" >> $GITHUB_PATH + - name: Install dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{matrix.llvm}} main" | sudo tee /etc/apt/sources.list.d/llvm.list + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get install -y llvm-${{matrix.llvm}}-dev \ + clang-${{matrix.llvm}} \ + libclang-${{matrix.llvm}}-dev \ + lld-${{matrix.llvm}} \ + libunwind-${{matrix.llvm}}-dev \ + libc++-${{matrix.llvm}}-dev \ + pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libuv1-dev + echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH + - name: Pre setup Conan + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt install -y python3 + python3 -m pip install conan + - name: Set up Conan + run: | + conan profile detect + - name: Setup LLGo + working-directory: .llgo + run: | + go install -v ./cmd/llgo/... + export LLGO_ROOT=$(pwd) + echo "LLGO_ROOT=$LLGO_ROOT" >> $GITHUB_ENV + # https://github.com/goplus/llgo/issues/1135 + echo "LLGO_RPATH_CHANGE=ON" >> $GITHUB_ENV + - name: Setup LLCppg + working-directory: .llcppg + run: | + llgo install ./_xtool/llcppsymg + llgo install ./_xtool/llcppsigfetch + go install github.com/goplus/llcppg/cmd/llcppcfg@${{matrix.llcppg}} + go install github.com/goplus/llcppg/cmd/gogensig@${{matrix.llcppg}} + go install github.com/goplus/llcppg/cmd/llcppg@${{matrix.llcppg}} + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + - name: Checkout to website + uses: actions/checkout@v4 + with: + ref: website + path: .website + - name: Copy llpkgstore.json to root + continue-on-error: true + run: | + ls .website .website/public + cp .website/public/llpkgstore.json . + rm -rf .website + - name: Verification & Prebuilt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: llpkgstore verification + - name: Run demotest process + env: + LLPKG_PATH: ${{ env.LLPKG_PATH }} + run: llpkgstore demotest From bfe47fb27a7830d50fccb65a8255798bdd4bf6b5 Mon Sep 17 00:00:00 2001 From: Askeladd <1351914167@qq.com> Date: Fri, 15 Aug 2025 16:53:20 +0800 Subject: [PATCH 2/2] add workflow --- numpy/.github/.DS_Store | Bin 6148 -> 0 bytes numpy/.github/workflows/auto-wheel-upload.yml | 63 -------- numpy/.github/workflows/issueclose.yml | 26 ---- numpy/.github/workflows/labelcreate.yml | 44 ------ numpy/.github/workflows/postprocessing.yml | 142 ------------------ numpy/.github/workflows/verification.yml | 120 --------------- 6 files changed, 395 deletions(-) delete mode 100644 numpy/.github/.DS_Store delete mode 100644 numpy/.github/workflows/auto-wheel-upload.yml delete mode 100644 numpy/.github/workflows/issueclose.yml delete mode 100644 numpy/.github/workflows/labelcreate.yml delete mode 100644 numpy/.github/workflows/postprocessing.yml delete mode 100644 numpy/.github/workflows/verification.yml diff --git a/numpy/.github/.DS_Store b/numpy/.github/.DS_Store deleted file mode 100644 index b46d673a2c036e2a6c0aa3da7788eb388a9d044d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKO-sW-5S^{nHi*!JLXQhxi`Ea+;w9F4@M=U4DmAfHgE1>jY7V84v;HA}iGN3D zcDJIm9u+GyF#9IE^ODWmu$ut@(d>8D04e}bMkg#d*i0}QCm*wd?U_Lo`X1L1fr1Q@ z!)PpX_la1wU2c4cv2#i<|0-JT|doi3)FpN4Tq zWlhzOJBj9cX25aEPP4%Xx(xPiIH;5x>!cY+nRoD_k7&`V#o99~04H`NKTYL!n zWML~5p`VWTmpUDUYmi%3fED>EAT%R5XF|)YT~=uvvuq( w>8zFLm*`}ammB<`V4#m;%%!8aimna&B?XAC#oQqFpz)7@mVp~q;8zuR2if&oR{#J2 diff --git a/numpy/.github/workflows/auto-wheel-upload.yml b/numpy/.github/workflows/auto-wheel-upload.yml deleted file mode 100644 index f571395..0000000 --- a/numpy/.github/workflows/auto-wheel-upload.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Auto Wheel Upload - -on: - pull_request: - types: [opened, edited, synchronize] - paths: - - 'llpkg/**' # 只监听 llpkg 文件夹的变化 - -jobs: - process-wheel-request: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - issues: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - token: ${{ secrets.WHEEL_UPLOAD_TOKEN }} - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.22' - - - name: Install llpkgstore - run: | - go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest - - - name: Process wheel request - env: - GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} - TARGET_REPO_OWNER: Bigdata-shiyang - TARGET_REPO_NAME: llpkg # 改为 llpkg - run: | - echo "Starting wheel upload process for PR #${{ github.event.number }}" - llpkgstore wheel-upload ${{ github.event.number }} - - - name: Add success label - if: success() - env: - GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} - run: | - echo "Adding success label to PR #${{ github.event.number }}" - curl -X POST \ - -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ - -d '{"labels":["wheel-added"]}' - - - name: Add failure label - if: failure() - env: - GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }} - run: | - echo "Adding failure label to PR #${{ github.event.number }}" - curl -X POST \ - -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ - -d '{"labels":["wheel-failed"]}' \ No newline at end of file diff --git a/numpy/.github/workflows/issueclose.yml b/numpy/.github/workflows/issueclose.yml deleted file mode 100644 index a5010ee..0000000 --- a/numpy/.github/workflows/issueclose.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Clean unused branch - - -on: - issues: - types: [closed] - - -jobs: - clean-resource: - runs-on: ubuntu-latest - # when issue has no label, it's safe to skip. - if: contains(github.event.issue.labels[0].name, 'branch:release-branch.') - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.23.x - - name: Set up Tool - run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest - - name: Run cleaner process - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: llpkgstore issueclose diff --git a/numpy/.github/workflows/labelcreate.yml b/numpy/.github/workflows/labelcreate.yml deleted file mode 100644 index 3ab10d4..0000000 --- a/numpy/.github/workflows/labelcreate.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Legacy version maintenance - - -# label trigger -on: - label: - types: [created] - - - -jobs: - maintenance: - runs-on: ubuntu-latest - if: startsWith(github.event.label.name, 'branch:release-branch.') - steps: - - name: Checkout to website - uses: actions/checkout@v4 - with: - ref: website - path: .website - - name: Checkout - uses: actions/checkout@v4 - with: - ref: main - path: .main - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.23.x - - name: Set up Tool - run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest - - name: Copy llpkgstore.json to root - continue-on-error: true - run: | - # ignore error - ls .website .website/public - cp .website/public/llpkgstore.json .main - rm -rf .website - - name: Run maintenance process - working-directory: .main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: llpkgstore labelcreate -l "${{ github.event.label.name }}" diff --git a/numpy/.github/workflows/postprocessing.yml b/numpy/.github/workflows/postprocessing.yml deleted file mode 100644 index f6f8a7c..0000000 --- a/numpy/.github/workflows/postprocessing.yml +++ /dev/null @@ -1,142 +0,0 @@ -name: Post-processing - -# don't limit to main branch -# consider maintenance branch -on: - push: - branches: - - 'release-branch.**' - - main - paths-ignore: - - '.github/**' - - LICENSE - - README.md - - '.gitignore' - -concurrency: - group: ${{ github.head_ref || github.ref_name }} - cancel-in-progress: true - -jobs: - release-binary-files: - strategy: - matrix: - os: - - macos-13 - - macos-latest - - ubuntu-24.04 - - ubuntu-24.04-arm - runs-on: ${{matrix.os}} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.23.x - - name: Set up Tool - run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest - - name: Install dependencies - if: startsWith(matrix.os, 'macos') - run: | - brew update - brew install cmake conan cjson - - name: Install dependencies - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt-get update - sudo apt-get install -y cmake python3 python3-pip pkg-config - python3 -m pip install conan - - name: Set up Conan - run: conan profile detect - - name: Run release process - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: llpkgstore release - - name: Upload binary file to artifact - uses: actions/upload-artifact@v4 - with: - name: ${{env.BIN_FILENAME}} - path: ${{env.BIN_PATH}} - retention-days: 1 - post-processing: - runs-on: ubuntu-latest - needs: [release-binary-files] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: main - path: .main - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.23.x - - name: Set up Tool - run: go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest - - name: Checkout to website - uses: actions/checkout@v4 - with: - ref: website - path: .website - - name: Copy llpkgstore.json to root - continue-on-error: true - run: | - ls .website .website/public - cp .website/public/llpkgstore.json .main - rm -rf .website - - name: Run post-processing process - working-directory: .main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: llpkgstore postprocessing - - name: Checkout website branch - uses: actions/checkout@v4 - with: - ref: website - path: .website - - name: Move llpkgstore.json to website - run: mv .main/llpkgstore.json .website/public - - name: Commit and push changes - working-directory: .website - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add public/llpkgstore.json - git commit -m "Update llpkgstore.json" - git push - build-and-upload: - runs-on: ubuntu-latest - needs: [post-processing] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: website - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 23.8.0 - - run: corepack enable - - name: Install Dependencies - uses: borales/actions-yarn@v4 - with: - cmd: install - - name: Build - uses: borales/actions-yarn@v4 - with: - cmd: build - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: 'dist' - deploy: - needs: build-and-upload - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/numpy/.github/workflows/verification.yml b/numpy/.github/workflows/verification.yml deleted file mode 100644 index 4e7efe3..0000000 --- a/numpy/.github/workflows/verification.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Verify Go Module - -# don't limit to main branch -# consider maintenance branch -on: - pull_request: - branches: - - 'release-branch.**' - - main - paths-ignore: - - '.github/**' - - LICENSE - - README.md - - '.gitignore' - -jobs: - llcppg-verification: - name: Verify Go Module - strategy: - matrix: - os: - - macos-13 - - macos-latest - - ubuntu-24.04 - - ubuntu-24.04-arm - llvm: [19] - llgo: [e68355d94f9f9ec17caae6e0d397bd55f8c5ec33] - llcppg: [v0.7.3] - - runs-on: ${{matrix.os}} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Check out LLGo - uses: actions/checkout@v4 - with: - repository: 'goplus/llgo' - path: .llgo - ref: ${{matrix.llgo}} - - name: Check out LLCppg - uses: actions/checkout@v4 - with: - repository: 'goplus/llcppg' - path: .llcppg - ref: ${{matrix.llcppg}} - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.23.x - - name: Set up Tool - run: | - go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest - - name: Install dependencies - if: startsWith(matrix.os, 'macos') - run: | - brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi libuv cmake conan lld@${{matrix.llvm}} - brew link --force libffi - echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH - echo "$(brew --prefix lld@${{matrix.llvm}})/bin" >> $GITHUB_PATH - - name: Install dependencies - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt-get update - echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{matrix.llvm}} main" | sudo tee /etc/apt/sources.list.d/llvm.list - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo apt-get install -y llvm-${{matrix.llvm}}-dev \ - clang-${{matrix.llvm}} \ - libclang-${{matrix.llvm}}-dev \ - lld-${{matrix.llvm}} \ - libunwind-${{matrix.llvm}}-dev \ - libc++-${{matrix.llvm}}-dev \ - pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libuv1-dev - echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH - - name: Pre setup Conan - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt install -y python3 - python3 -m pip install conan - - name: Set up Conan - run: | - conan profile detect - - name: Setup LLGo - working-directory: .llgo - run: | - go install -v ./cmd/llgo/... - export LLGO_ROOT=$(pwd) - echo "LLGO_ROOT=$LLGO_ROOT" >> $GITHUB_ENV - # https://github.com/goplus/llgo/issues/1135 - echo "LLGO_RPATH_CHANGE=ON" >> $GITHUB_ENV - - name: Setup LLCppg - working-directory: .llcppg - run: | - llgo install ./_xtool/llcppsymg - llgo install ./_xtool/llcppsigfetch - go install github.com/goplus/llcppg/cmd/llcppcfg@${{matrix.llcppg}} - go install github.com/goplus/llcppg/cmd/gogensig@${{matrix.llcppg}} - go install github.com/goplus/llcppg/cmd/llcppg@${{matrix.llcppg}} - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v45 - - name: Checkout to website - uses: actions/checkout@v4 - with: - ref: website - path: .website - - name: Copy llpkgstore.json to root - continue-on-error: true - run: | - ls .website .website/public - cp .website/public/llpkgstore.json . - rm -rf .website - - name: Verification & Prebuilt - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: llpkgstore verification - - name: Run demotest process - env: - LLPKG_PATH: ${{ env.LLPKG_PATH }} - run: llpkgstore demotest