more workflow changes, put them in README

This commit is contained in:
Struma 2023-05-04 14:30:42 -04:00
parent 9a8f09ae3f
commit b79881aada
8 changed files with 54 additions and 14 deletions

View file

@ -3,13 +3,18 @@ name: Automatic Build
on: on:
push: push:
branches: ['autobuild'] branches: ['dev']
jobs: jobs:
build-windows: build-windows:
name: Windows name: Windows
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
length: 6
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:
msystem: mingw64 msystem: mingw64
@ -27,6 +32,13 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
windows/build-mingw64
windows/downloads
key: win-${{ hashFiles('windows/Makefile') }}
- name: Build all dependencies - name: Build all dependencies
shell: msys2 {0} shell: msys2 {0}
run: | run: |
@ -56,7 +68,7 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: mkxp-z.windows.${{github.ref_name}}-${{github.sha}} name: mkxp-z.windows.${{github.ref_name}}-${{steps.short-sha.outputs.sha}}
path: | path: |
build/artifact/*.dll build/artifact/*.dll
build/artifact/*.exe build/artifact/*.exe
@ -64,12 +76,24 @@ jobs:
build/artifact/stdlib/ build/artifact/stdlib/
build-linux: build-linux:
name: Linux x86_64 name: Ubuntu 22.04
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
length: 6
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
linux/build-x86_64
linux/downloads
key: lin-${{ hashFiles('linux/Makefile') }}
- name: Install apt dependencies - name: Install apt dependencies
run: sudo apt install git build-essential cmake meson autoconf automake libtool pkg-config ruby bison zlib1g-dev libbz2-dev xorg-dev libgl1-mesa-dev libasound2-dev libpulse-dev -y run: sudo apt install git build-essential cmake meson autoconf automake libtool pkg-config ruby bison zlib1g-dev libbz2-dev xorg-dev libgl1-mesa-dev libasound2-dev libpulse-dev -y
@ -95,16 +119,30 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: mkxp-z.linux.${{github.ref_name}}-${{github.sha}} name: mkxp-z.linux.${{github.ref_name}}-${{steps.short-sha.outputs.sha}}
path: build/local/ path: build/local/
build-macos: build-macos:
name: macOS name: macOS
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
length: 6
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
macos/Dependencies/build-macosx-x86_64
macos/Dependencies/build-macosx-arm64
macos/Dependencies/build-macosx-universal
macos/Dependencies/downloads
key: mac-${{ hashFiles('macos/Dependencies/*.make', 'macos/Dependencies/*.sh') }}
- name: Install Homebrew tools - name: Install Homebrew tools
run: | run: |
cd macos/Dependencies cd macos/Dependencies
@ -113,7 +151,7 @@ jobs:
- name: Build all dependencies - name: Build all dependencies
run: | run: |
cd macos/Dependencies cd macos/Dependencies
./setup ./setup.sh
- name: Build app - name: Build app
run: | run: |
@ -128,5 +166,5 @@ jobs:
- name: Upload archive - name: Upload archive
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: mkxp-z.macos.${{github.ref_name}}-${{github.sha}} name: mkxp-z.macos.${{github.ref_name}}-${{steps.short-sha.outputs.sha}}
path: build/Build/Products/Release/Z-universal.app.zip path: build/Build/Products/Release/Z-universal.app.zip

View file

@ -1,7 +1,9 @@
# mkxp-z # mkxp-z
<p align="center"><b> <p align="center"><b>
<a href="https://github.com/mkxp-z/mkxp-z/releases">Downloads</a> <a href="https://github.com/mkxp-z/mkxp-z/releases">Releases</a>
<a href="https://github.com/mkxp-z/mkxp-z/actions/workflows/autobuild.yml">Automatic Builds</a>
<a href="https://github.com/mkxp-z/mkxp-z/wiki">Documentation</a> <a href="https://github.com/mkxp-z/mkxp-z/wiki">Documentation</a>
</b></p> </b></p>

View file

@ -10,4 +10,4 @@ OPENAL_FLAGS := -DALSOFT_CPUEXT_NEON=no ${OPENAL_FLAGS}
OPENSSL_FLAGS := darwin64-$(ARCH)-cc OPENSSL_FLAGS := darwin64-$(ARCH)-cc
RUBY_FLAGS := ${RUBY_FLAGS} RUBY_FLAGS := ${RUBY_FLAGS}
include dependencies.make include common.make

View file

@ -10,20 +10,20 @@ def run_build(arch)
if `xcodebuild -version`.scan(/Xcode (\d+)/)[0][0].to_i >= 12 if `xcodebuild -version`.scan(/Xcode (\d+)/)[0][0].to_i >= 12
printf("Building libraries for Apple Silicon...\n") printf("Building libraries for Apple Silicon...\n")
printf("====================================================\n") printf("====================================================\n")
code = system("make everything -f .AppleSilicon") code = system("make everything -f arm64.make")
return code if !code return code if !code
end end
printf("====================================================\n") printf("====================================================\n")
printf("Building libraries for Intel...\n") printf("Building libraries for Intel...\n")
printf("====================================================\n") printf("====================================================\n")
code = (system("make everything -f .Intel")) code = (system("make everything -f x86_64.make"))
return code if !code return code if !code
printf("====================================================\n") printf("====================================================\n")
printf("Performing post-setup...\n") printf("Performing post-setup...\n")
printf("====================================================\n") printf("====================================================\n")
printf("Creating universal libraries ...\n") printf("Creating universal libraries ...\n")
return system("./make_macuniversal") return system("./make_macuniversal.sh")
end end
def fix_steam(libpath) def fix_steam(libpath)

View file

@ -12,4 +12,4 @@ RUBY_FLAGS := ${RUBY_FLAGS}
include dependencies.make include common.make

View file

@ -4,4 +4,4 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR/Dependencies" cd "$DIR/Dependencies"
./setup ./setup.sh