Fix build (#563)

ref ToruNiina/toml11/commit/22db720ad55c3470c4d036ae74be35e68c761845
This commit is contained in:
Howard Wu authored and GitHub committed 2023-01-12 21:25:50 +08:00
1 parent d47b8868e5
commit c90d7a66db
6 files changed
+60 -69

No files matched your search

+37 -33
View File
@@ -1,5 +1,9 @@
name: GitHub CI name: GitHub CI
on: [push] on:
push:
branches: [ master ]
workflow_dispatch:
pull_request:
concurrency: concurrency:
group: ${{ github.ref }}-${{ github.workflow }} group: ${{ github.ref }}-${{ github.workflow }}
@@ -10,23 +14,23 @@ jobs:
name: Linux x86 Build name: Linux x86 Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Add commit id into version - name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }} 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 run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Build - 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" 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 - name: Upload
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: subconverter_linux32 name: subconverter_linux32
path: subconverter/ path: subconverter/
- name: Package Release - 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 run: tar czf subconverter_linux32.tar.gz subconverter
- name: Draft Release - name: Draft Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with: with:
files: subconverter_linux32.tar.gz files: subconverter_linux32.tar.gz
draft: true draft: true
@@ -35,23 +39,23 @@ jobs:
name: Linux x86_64 Build name: Linux x86_64 Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Add commit id into version - name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }} 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 run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Build - 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" 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 - name: Upload
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: subconverter_linux64 name: subconverter_linux64
path: subconverter/ path: subconverter/
- name: Package Release - 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 run: tar czf subconverter_linux64.tar.gz subconverter
- name: Draft Release - name: Draft Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with: with:
files: subconverter_linux64.tar.gz files: subconverter_linux64.tar.gz
draft: true draft: true
@@ -60,23 +64,23 @@ jobs:
name: Linux armv7 Build name: Linux armv7 Build
runs-on: [self-hosted, linux, ARM64] runs-on: [self-hosted, linux, ARM64]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Add commit id into version - name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }} 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 run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Build - 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" 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 - name: Upload
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: subconverter_armv7 name: subconverter_armv7
path: subconverter/ path: subconverter/
- name: Package Release - 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 run: tar czf subconverter_armv7.tar.gz subconverter
- name: Draft Release - name: Draft Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with: with:
files: subconverter_armv7.tar.gz files: subconverter_armv7.tar.gz
draft: true draft: true
@@ -85,23 +89,23 @@ jobs:
name: Linux aarch64 Build name: Linux aarch64 Build
runs-on: [self-hosted, linux, ARM64] runs-on: [self-hosted, linux, ARM64]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Add commit id into version - name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }} 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 run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Build - 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" 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 - name: Upload
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: subconverter_aarch64 name: subconverter_aarch64
path: subconverter/ path: subconverter/
- name: Package Release - 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 run: tar czf subconverter_aarch64.tar.gz subconverter
- name: Draft Release - name: Draft Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with: with:
files: subconverter_aarch64.tar.gz files: subconverter_aarch64.tar.gz
draft: true draft: true
@@ -110,23 +114,23 @@ jobs:
name: macOS Build name: macOS Build
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Add commit id into version - name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }} 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 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 - name: Build
run: bash scripts/build.macos.release.sh run: bash scripts/build.macos.release.sh
- name: Upload - name: Upload
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: subconverter_darwin64 name: subconverter_darwin64
path: subconverter/ path: subconverter/
- name: Package Release - 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 run: tar czf subconverter_darwin64.tar.gz subconverter
- name: Draft Release - name: Draft Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with: with:
files: subconverter_darwin64.tar.gz files: subconverter_darwin64.tar.gz
draft: true draft: true
@@ -138,10 +142,10 @@ jobs:
run: run:
shell: msys2 {0} shell: msys2 {0}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2-beta - uses: actions/setup-node@v3
with: with:
node-version: '12' node-version: '16'
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:
update: true update: true
@@ -154,16 +158,16 @@ jobs:
- name: Build - name: Build
run: bash scripts/build.windows.release.sh run: bash scripts/build.windows.release.sh
- name: Upload - name: Upload
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: subconverter_win64 name: subconverter_win64
path: subconverter/ path: subconverter/
- name: Package Release - 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/ run: 7z a subconverter_win64.7z subconverter/
- name: Draft Release - name: Draft Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with: with:
files: subconverter_win64.7z files: subconverter_win64.7z
draft: true draft: true
@@ -175,10 +179,10 @@ jobs:
run: run:
shell: msys2 {0} shell: msys2 {0}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2-beta - uses: actions/setup-node@v3
with: with:
node-version: '12' node-version: '16'
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:
update: true update: true
@@ -191,16 +195,16 @@ jobs:
- name: Build - name: Build
run: bash scripts/build.windows.release.sh run: bash scripts/build.windows.release.sh
- name: Upload - name: Upload
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: subconverter_win32 name: subconverter_win32
path: subconverter/ path: subconverter/
- name: Package Release - 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/ run: 7z a subconverter_win32.7z subconverter/
- name: Draft Release - name: Draft Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with: with:
files: subconverter_win32.7z files: subconverter_win32.7z
draft: true draft: true
+13 -11
View File
@@ -1,5 +1,7 @@
name: Publish Docker Image name: Publish Docker Image
on: [push] on:
push:
branches: [ master ]
concurrency: concurrency:
group: ${{ github.ref }}-${{ github.workflow }} group: ${{ github.ref }}-${{ github.workflow }}
@@ -11,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout base - name: Checkout base
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -42,7 +44,7 @@ jobs:
- name: Replace tag without `v` - name: Replace tag without `v`
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: actions/github-script@v1 uses: actions/github-script@v6
id: version id: version
with: with:
script: | script: |
@@ -78,7 +80,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout base - name: Checkout base
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -109,7 +111,7 @@ jobs:
- name: Replace tag without `v` - name: Replace tag without `v`
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: actions/github-script@v1 uses: actions/github-script@v6
id: version id: version
with: with:
script: | script: |
@@ -145,7 +147,7 @@ jobs:
runs-on: [self-hosted, linux, ARM64] runs-on: [self-hosted, linux, ARM64]
steps: steps:
- name: Checkout base - name: Checkout base
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -180,7 +182,7 @@ jobs:
- name: Replace tag without `v` - name: Replace tag without `v`
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: actions/github-script@v1 uses: actions/github-script@v6
id: version id: version
with: with:
script: | script: |
@@ -218,7 +220,7 @@ jobs:
runs-on: [self-hosted, linux, ARM64] runs-on: [self-hosted, linux, ARM64]
steps: steps:
- name: Checkout base - name: Checkout base
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -253,7 +255,7 @@ jobs:
- name: Replace tag without `v` - name: Replace tag without `v`
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: actions/github-script@v1 uses: actions/github-script@v6
id: version id: version
with: with:
script: | script: |
@@ -292,7 +294,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout base - name: Checkout base
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -347,7 +349,7 @@ jobs:
- name: Replace tag without `v` - name: Replace tag without `v`
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: actions/github-script@v1 uses: actions/github-script@v6
id: version id: version
with: with:
script: | script: |
+2 -7
View File
@@ -30,17 +30,12 @@ git clone https://github.com/PerMalmberg/libcron --depth=1
cd libcron cd libcron
git submodule update --init git submodule update --init
cmake -DCMAKE_BUILD_TYPE=Release . cmake -DCMAKE_BUILD_TYPE=Release .
make libcron -j2 make libcron install -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/
cd .. cd ..
git clone https://github.com/ToruNiina/toml11 --depth=1 git clone https://github.com/ToruNiina/toml11 --depth=1
cd toml11 cd toml11
cmake . cmake -DCMAKE_CXX_STANDARD=11 .
make install -j4 make install -j4
cd .. cd ..
+2 -2
View File
@@ -31,7 +31,7 @@ git clone https://github.com/PerMalmberg/libcron --depth=1
cd libcron cd libcron
git submodule update --init git submodule update --init
cmake -DCMAKE_BUILD_TYPE=Release . cmake -DCMAKE_BUILD_TYPE=Release .
make libcron -j8 make libcron install -j8
install -m644 libcron/out/Release/liblibcron.a /usr/local/lib/ install -m644 libcron/out/Release/liblibcron.a /usr/local/lib/
install -d /usr/local/include/libcron/ install -d /usr/local/include/libcron/
install -m644 libcron/include/libcron/* /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 git clone https://github.com/ToruNiina/toml11 --depth=1
cd toml11 cd toml11
cmake . cmake -DCMAKE_CXX_STANDARD=11 .
make install -j4 make install -j4
cd .. cd ..
+3 -8
View File
@@ -27,13 +27,8 @@ cd ..
git clone https://github.com/PerMalmberg/libcron --depth=1 git clone https://github.com/PerMalmberg/libcron --depth=1
cd libcron cd libcron
git submodule update --init git submodule update --init
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$MINGW_PREFIX" .
make libcron -j4 make libcron install -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/"
cd .. cd ..
git clone https://github.com/Tencent/rapidjson --depth=1 git clone https://github.com/Tencent/rapidjson --depth=1
@@ -44,7 +39,7 @@ cd ..
git clone https://github.com/ToruNiina/toml11 --depth=1 git clone https://github.com/ToruNiina/toml11 --depth=1
cd toml11 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 make install -j4
cd .. cd ..
+3 -8
View File
@@ -29,17 +29,12 @@ cd ..
git clone https://github.com/PerMalmberg/libcron --depth=1 git clone https://github.com/PerMalmberg/libcron --depth=1
cd libcron cd libcron
git submodule update --init git submodule update --init
cmake -DCMAKE_BUILD_TYPE=Release . cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .
make libcron -j3 make libcron install -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/
cd .. cd ..
git clone https://github.com/ToruNiina/toml11 --depth=1 git clone https://github.com/ToruNiina/toml11 --depth=1
cd toml11 cd toml11
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX . cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_CXX_STANDARD=11 .
make install -j3 make install -j3
cd .. cd ..