mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-26 10:52:21 +00:00
Fix build (#563)
ref ToruNiina/toml11/commit/22db720ad55c3470c4d036ae74be35e68c761845
This commit is contained in:
70
.github/workflows/build.yml
vendored
70
.github/workflows/build.yml
vendored
@@ -1,5 +1,9 @@
|
||||
name: GitHub CI
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
@@ -10,23 +14,23 @@ jobs:
|
||||
name: Linux x86 Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_linux32
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_linux32.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_linux32.tar.gz
|
||||
draft: true
|
||||
@@ -35,23 +39,23 @@ jobs:
|
||||
name: Linux x86_64 Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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 -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:amd64-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: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_linux64
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_linux64.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_linux64.tar.gz
|
||||
draft: true
|
||||
@@ -60,23 +64,23 @@ jobs:
|
||||
name: Linux armv7 Build
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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 -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: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_armv7
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_armv7.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_armv7.tar.gz
|
||||
draft: true
|
||||
@@ -85,23 +89,23 @@ jobs:
|
||||
name: Linux aarch64 Build
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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 -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: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_aarch64
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_aarch64.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_aarch64.tar.gz
|
||||
draft: true
|
||||
@@ -110,23 +114,23 @@ jobs:
|
||||
name: macOS Build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_darwin64
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_darwin64.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_darwin64.tar.gz
|
||||
draft: true
|
||||
@@ -138,10 +142,10 @@ jobs:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2-beta
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '12'
|
||||
node-version: '16'
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
@@ -154,16 +158,16 @@ jobs:
|
||||
- name: Build
|
||||
run: bash scripts/build.windows.release.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_win64
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: 7z a subconverter_win64.7z subconverter/
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_win64.7z
|
||||
draft: true
|
||||
@@ -175,10 +179,10 @@ jobs:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2-beta
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '12'
|
||||
node-version: '16'
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
@@ -191,16 +195,16 @@ jobs:
|
||||
- name: Build
|
||||
run: bash scripts/build.windows.release.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_win32
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: 7z a subconverter_win32.7z subconverter/
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_win32.7z
|
||||
draft: true
|
||||
|
||||
24
.github/workflows/docker.yml
vendored
24
.github/workflows/docker.yml
vendored
@@ -1,5 +1,7 @@
|
||||
name: Publish Docker Image
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
@@ -11,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -42,7 +44,7 @@ jobs:
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v1
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
@@ -78,7 +80,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -109,7 +111,7 @@ jobs:
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v1
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
@@ -145,7 +147,7 @@ jobs:
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -180,7 +182,7 @@ jobs:
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v1
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
@@ -218,7 +220,7 @@ jobs:
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -253,7 +255,7 @@ jobs:
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v1
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
@@ -292,7 +294,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -347,7 +349,7 @@ jobs:
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v1
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
|
||||
@@ -30,17 +30,12 @@ git clone https://github.com/PerMalmberg/libcron --depth=1
|
||||
cd libcron
|
||||
git submodule update --init
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make libcron -j2
|
||||
install -m644 libcron/out/Release/liblibcron.a /usr/lib/
|
||||
install -d /usr/include/libcron/
|
||||
install -m644 libcron/include/libcron/* /usr/include/libcron/
|
||||
install -d /usr/include/date/
|
||||
install -m644 libcron/externals/date/include/date/* /usr/include/date/
|
||||
make libcron install -j2
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ToruNiina/toml11 --depth=1
|
||||
cd toml11
|
||||
cmake .
|
||||
cmake -DCMAKE_CXX_STANDARD=11 .
|
||||
make install -j4
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ git clone https://github.com/PerMalmberg/libcron --depth=1
|
||||
cd libcron
|
||||
git submodule update --init
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make libcron -j8
|
||||
make libcron install -j8
|
||||
install -m644 libcron/out/Release/liblibcron.a /usr/local/lib/
|
||||
install -d /usr/local/include/libcron/
|
||||
install -m644 libcron/include/libcron/* /usr/local/include/libcron/
|
||||
@@ -41,7 +41,7 @@ cd ..
|
||||
|
||||
git clone https://github.com/ToruNiina/toml11 --depth=1
|
||||
cd toml11
|
||||
cmake .
|
||||
cmake -DCMAKE_CXX_STANDARD=11 .
|
||||
make install -j4
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -27,13 +27,8 @@ cd ..
|
||||
git clone https://github.com/PerMalmberg/libcron --depth=1
|
||||
cd libcron
|
||||
git submodule update --init
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .
|
||||
make libcron -j4
|
||||
install -m644 libcron/out/Release/liblibcron.a "$MINGW_PREFIX/lib/"
|
||||
install -d "$MINGW_PREFIX/include/libcron/"
|
||||
install -m644 libcron/include/libcron/* "$MINGW_PREFIX/include/libcron/"
|
||||
install -d "$MINGW_PREFIX/include/date/"
|
||||
install -m644 libcron/externals/date/include/date/* "$MINGW_PREFIX/include/date/"
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$MINGW_PREFIX" .
|
||||
make libcron install -j4
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/Tencent/rapidjson --depth=1
|
||||
@@ -44,7 +39,7 @@ cd ..
|
||||
|
||||
git clone https://github.com/ToruNiina/toml11 --depth=1
|
||||
cd toml11
|
||||
cmake -DCMAKE_INSTALL_PREFIX="$MINGW_PREFIX" -G "Unix Makefiles" .
|
||||
cmake -DCMAKE_INSTALL_PREFIX="$MINGW_PREFIX" -G "Unix Makefiles" -DCMAKE_CXX_STANDARD=11 .
|
||||
make install -j4
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -29,17 +29,12 @@ cd ..
|
||||
git clone https://github.com/PerMalmberg/libcron --depth=1
|
||||
cd libcron
|
||||
git submodule update --init
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make libcron -j3
|
||||
install -m644 libcron/out/Release/liblibcron.a $PREFIX/lib/
|
||||
install -d $PREFIX/include/libcron/
|
||||
install -m644 libcron/include/libcron/* $PREFIX/include/libcron/
|
||||
install -d $PREFIX/include/date/
|
||||
install -m644 libcron/externals/date/include/date/* $PREFIX/include/date/
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .
|
||||
make libcron install -j3
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ToruNiina/toml11 --depth=1
|
||||
cd toml11
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX .
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_CXX_STANDARD=11 .
|
||||
make install -j3
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user