From e1b4e08fd72e8ad5cdf07c8745435486560ba54d Mon Sep 17 00:00:00 2001 From: Mulder Chen <32414985+mulder125@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:20:12 +0800 Subject: [PATCH] Update build.yml Only build Win64 & Linux64 --- .github/workflows/build.yml | 189 ------------------------------------ 1 file changed, 189 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c9b745d2..1ecc267e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,34 +10,6 @@ concurrency: cancel-in-progress: true jobs: - linux32_build: - name: Linux x86 Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Add commit id into version - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h - - name: Build - run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:x86-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh" - - - name: Package Release - run: tar czf subconverter_linux32.tar.gz subconverter - - - name: Upload - uses: actions/upload-artifact@v3 - with: - path: | - subconverter_*.tar.gz - - - name: Draft Release - uses: softprops/action-gh-release@v1 - if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }} - with: - files: subconverter_linux32.tar.gz - draft: true - tag_name: Alpha - linux64_build: name: Linux x86_64 Build runs-on: ubuntu-latest @@ -66,121 +38,6 @@ jobs: draft: true tag_name: Alpha - armv7_build: - name: Linux armv7 Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Add commit id into version - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h - - name: Build - run: docker run -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:armv7-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh" - - name: Package Release - run: tar czf subconverter_armv7.tar.gz subconverter - - - name: Upload - uses: actions/upload-artifact@v3 - with: - path: | - subconverter_*.tar.gz - - - name: Draft Release - uses: softprops/action-gh-release@v1 - if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }} - with: - files: subconverter_armv7.tar.gz - draft: true - tag_name: Alpha - - aarch64_build: - name: Linux aarch64 Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Add commit id into version - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h - - name: Build - run: docker run -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:aarch64-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh" - - name: Package Release - run: tar czf subconverter_aarch64.tar.gz subconverter - - - name: Upload - uses: actions/upload-artifact@v3 - with: - path: | - subconverter_*.tar.gz - - - name: Draft Release - uses: softprops/action-gh-release@v1 - if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }} - with: - files: subconverter_aarch64.tar.gz - draft: true - tag_name: Alpha - - armhf_build: - name: Linux armhf Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Add commit id into version - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h - - name: Build - run: docker run -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:armhf-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh" - - name: Package Release - run: tar czf subconverter_armhf.tar.gz subconverter - - - name: Upload - uses: actions/upload-artifact@v3 - with: - path: | - subconverter_*.tar.gz - - - name: Draft Release - uses: softprops/action-gh-release@v1 - if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }} - with: - files: subconverter_armhf.tar.gz - draft: true - tag_name: Alpha - - macos_build: - name: macOS Build - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - name: Add commit id into version - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - run: SHA=$(git rev-parse --short HEAD) && sed -i -e 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h - - name: Build - run: bash scripts/build.macos.release.sh - - - name: Package Release - run: tar czf subconverter_darwin64.tar.gz subconverter - - - name: Upload - uses: actions/upload-artifact@v3 - with: - path: | - subconverter_*.tar.gz - - - name: Draft Release - uses: softprops/action-gh-release@v1 - if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }} - with: - files: subconverter_darwin64.tar.gz - draft: true - tag_name: Alpha - windows64_build: name: Windows x86_64 Build runs-on: windows-latest @@ -221,59 +78,13 @@ jobs: draft: true tag_name: Alpha - windows32_build: - name: Windows x86 Build - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: "16" - - uses: msys2/setup-msys2@v2 - with: - update: true - install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2 patch - msystem: MINGW32 - path-type: inherit - - name: Add commit id into version - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h - - name: Build - run: bash scripts/build.windows.release.sh - - - name: Package Release - run: 7z a subconverter_win32.7z subconverter/ - - - name: Upload - uses: actions/upload-artifact@v3 - with: - path: | - subconverter_*.7z - - - name: Draft Release - uses: softprops/action-gh-release@v1 - if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }} - with: - files: subconverter_win32.7z - draft: true - tag_name: Alpha - Upload-Release: permissions: write-all if: ${{ github.ref_type=='branch' }} needs: [ linux64_build, - linux32_build, - armv7_build, - armhf_build, - aarch64_build, - macos_build, windows64_build, - windows32_build, ] runs-on: ubuntu-latest steps: