Compare commits
1 Commits
master
...
c64ae3c2f0
| Author | SHA1 | Date | |
|---|---|---|---|
|
c64ae3c2f0
|
@@ -18,64 +18,52 @@ jobs:
|
|||||||
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
|
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
|
||||||
gcc-x86-64-linux-gnu g++-x86-64-linux-gnu \
|
gcc-x86-64-linux-gnu g++-x86-64-linux-gnu \
|
||||||
gcc-i686-linux-gnu g++-i686-linux-gnu \
|
gcc-i686-linux-gnu g++-i686-linux-gnu \
|
||||||
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 \
|
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
|
||||||
gcc-mingw-w64-i686 g++-mingw-w64-i686
|
|
||||||
- name: Download Cross-Build
|
- name: Download Cross-Build
|
||||||
run: git clone https://dev.npid7.de/tobid7/cross-build
|
run: git clone https://dev.npid7.de/tobid7/cross-build
|
||||||
- name: Build Targets
|
- name: Build Targets
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build_artifacts
|
|
||||||
declare -A TARGETS=(
|
declare -A TARGETS=(
|
||||||
["linux-i386"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-i386.cmake"
|
["linux-i386"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-i386.cmake"
|
||||||
["linux-x86_64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-x86_64.cmake"
|
["linux-x86_64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-x86_64.cmake"
|
||||||
["linux-armhf"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-armhf.cmake"
|
["linux-armhf"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-armhf.cmake"
|
||||||
["linux-aarch64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-aarch64.cmake"
|
["linux-aarch64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-aarch64.cmake"
|
||||||
["windows-x86_64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/windows-mingw-x86_64.cmake"
|
["windows-x86_64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/windows-mingw-x86_64.cmake"
|
||||||
["windows-x86"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/windows-mingw-i386.cmake"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for name in "${!TARGETS[@]}"; do
|
for name in "${!TARGETS[@]}"; do
|
||||||
cmake ${TARGETS[$name]} -DCMAKE_INSTALL_PREFIX=bin-$name -B build-$name .
|
cmake ${TARGETS[$name]} -DCMAKE_INSTALL_PREFIX=bin-$name -B build-$name .
|
||||||
cmake --build build-$name --parallel
|
cmake --build build-$name --parallel
|
||||||
cmake --install build-$name
|
cmake --install build-$name
|
||||||
zip -r build_artifacts/${name}.zip bin-$name
|
mkdir -p artifacts/$name
|
||||||
|
cp -r bin-$name/* artifacts/$name/
|
||||||
done
|
done
|
||||||
- name: Upload Artifacts
|
build-macos:
|
||||||
uses: actions/upload-artifact@v3
|
runs-on: macos-latest
|
||||||
with:
|
steps:
|
||||||
name: linux-builds
|
- name: Checkout
|
||||||
path: build_artifacts/*.zip
|
uses: actions/checkout@v4
|
||||||
# build-macos:
|
- name: Build
|
||||||
# runs-on: macos-latest
|
run: |
|
||||||
# steps:
|
cmake -DCMAKE_INSTALL_PREFIX=bin-macos-universal -DCMAKE_OSX_ARCHITECURE="x86_64;arm64" -B build .
|
||||||
# - name: Checkout
|
cmake --build build
|
||||||
# uses: actions/checkout@v4
|
cmake --install build
|
||||||
# - name: Build
|
cp -r bin-macos-universal/* artifacts/macos-universal/
|
||||||
# run: |
|
|
||||||
# mkdir -p build_artifacts
|
|
||||||
# cmake -DCMAKE_INSTALL_PREFIX=bin-macos-universal -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -B build .
|
|
||||||
# cmake --build build
|
|
||||||
# cmake --install build
|
|
||||||
# mkdir -p artifacts/macos-universal
|
|
||||||
# cp -r bin-macos-universal/* artifacts/macos-universal/
|
|
||||||
# zip -r build_artifacts/macos-universal.zip bin-macos-universal
|
|
||||||
# - name: Upload Artifact
|
|
||||||
# uses: actions/upload-artifact@v3
|
|
||||||
# with:
|
|
||||||
# name: macos-build
|
|
||||||
# path: build_artifacts/*.zip
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-linux] #, build-macos]
|
needs: [build-linux, build-macos]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Prepare Files
|
||||||
uses: actions/download-artifact@v3
|
run: |
|
||||||
with:
|
mkdir -p release_files
|
||||||
path: release_files
|
for d in artifacts/*; do
|
||||||
|
name=$(basename "$d")
|
||||||
|
zip -r "release_files/$name.zip" "$d"
|
||||||
|
done
|
||||||
|
|
||||||
- name: Get Date
|
- name: Get Date
|
||||||
run: echo "TAG_NAME=v$(date -u +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV
|
run: echo "TAG_NAME=v$(date -u +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV
|
||||||
@@ -85,10 +73,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.TOKEN }}
|
token: ${{ secrets.TOKEN }}
|
||||||
prerelease: true
|
prerelease: true
|
||||||
name: "Automated Build ${{ env.TAG_NAME }}"
|
name: "Dev build ${{ env.TAG_NAME }}"
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
body: |
|
body: |
|
||||||
**Automated prerelease build**
|
**Automated build**
|
||||||
Commit: ${{ github.sha }}
|
Commit: ${{ github.sha }}
|
||||||
Triggered by: ${{ github.actor }}
|
Triggered by: ${{ github.actor }}
|
||||||
files: release_files/**/*.zip
|
files: release_files/*.zip
|
||||||
|
|||||||
@@ -1,98 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*.*.*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Install Tools
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y build-essential make cmake zip \
|
|
||||||
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
|
|
||||||
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
|
|
||||||
gcc-x86-64-linux-gnu g++-x86-64-linux-gnu \
|
|
||||||
gcc-i686-linux-gnu g++-i686-linux-gnu \
|
|
||||||
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 \
|
|
||||||
gcc-mingw-w64-i686 g++-mingw-w64-i686
|
|
||||||
- name: Download Cross-Build
|
|
||||||
run: git clone https://dev.npid7.de/tobid7/cross-build
|
|
||||||
- name: Build Targets
|
|
||||||
run: |
|
|
||||||
mkdir -p build_artifacts
|
|
||||||
declare -A TARGETS=(
|
|
||||||
["linux-i386"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-i386.cmake"
|
|
||||||
["linux-x86_64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-x86_64.cmake"
|
|
||||||
["linux-armhf"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-armhf.cmake"
|
|
||||||
["linux-aarch64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/linux-aarch64.cmake"
|
|
||||||
["windows-x86_64"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/windows-mingw-x86_64.cmake"
|
|
||||||
["windows-x86"]="-DCMAKE_TOOLCHAIN_FILE=cross-build/cmake/windows-mingw-i386.cmake"
|
|
||||||
)
|
|
||||||
|
|
||||||
for name in "${!TARGETS[@]}"; do
|
|
||||||
cmake ${TARGETS[$name]} -DCMAKE_INSTALL_PREFIX=bin-$name -B build-$name .
|
|
||||||
cmake --build build-$name --parallel
|
|
||||||
cmake --install build-$name
|
|
||||||
zip -r build_artifacts/${name}.zip bin-$name
|
|
||||||
done
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: linux-builds
|
|
||||||
path: build_artifacts/*.zip
|
|
||||||
|
|
||||||
build-macos:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
mkdir -p build_artifacts
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=bin-macos-universal -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -B build .
|
|
||||||
cmake --build build
|
|
||||||
cmake --install build
|
|
||||||
mkdir -p artifacts/macos-universal
|
|
||||||
cp -r bin-macos-universal/* artifacts/macos-universal/
|
|
||||||
zip -r build_artifacts/macos-universal.zip bin-macos-universal
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: macos-build
|
|
||||||
path: build_artifacts/*.zip
|
|
||||||
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [build-linux, build-macos]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Download Artifacts
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
path: release_files
|
|
||||||
|
|
||||||
- name: Upload to Gitea
|
|
||||||
uses: akkuman/gitea-release-action@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.TOKEN }}
|
|
||||||
prerelease: false
|
|
||||||
name: "Release ${{ github.ref_name }}"
|
|
||||||
tag_name: ${{ github.ref_name }}
|
|
||||||
body: |
|
|
||||||
**Bannertool Release ${{ github.ref_name }}**
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Triggered by: ${{ github.actor }}
|
|
||||||
Supported Systems:
|
|
||||||
- Windows x64
|
|
||||||
- Windows x86 (32 Bit)
|
|
||||||
- Linux x86_64
|
|
||||||
- Linux x86 (32 Bit)
|
|
||||||
- Linux armhf (32 Bit)
|
|
||||||
- Linux aarch64 (arm64)
|
|
||||||
files: release_files/**/*.zip
|
|
||||||
12
README.md
12
README.md
@@ -2,14 +2,10 @@
|
|||||||
|
|
||||||
A tool for creating 3DS banners.
|
A tool for creating 3DS banners.
|
||||||
|
|
||||||
## Building
|
## How to build (Using Docker)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake -B build .
|
docker build -t bannertool-builder .
|
||||||
cmake --build build
|
docker run --name bannertool-builder bannertool-builder
|
||||||
|
docker cp bannertool-builder:/bannertool/output/bannertool.zip .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Credits
|
|
||||||
|
|
||||||
- Stevice10: Creating bannertool
|
|
||||||
- tobid7: Providing binaries for more systems
|
|
||||||
|
|||||||
Reference in New Issue
Block a user