Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
Only build Win64 & Linux64
  • Loading branch information
mulder125 authored Dec 26, 2023
1 parent f0a9ffb commit e1b4e08
Showing 1 changed file with 0 additions and 189 deletions.
189 changes: 0 additions & 189 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit e1b4e08

Please sign in to comment.