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:
push:
branches: ['autobuild']
branches: ['dev']
jobs:
build-windows:
name: Windows
runs-on: windows-latest
steps:
- uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
length: 6
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
@ -27,6 +32,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
windows/build-mingw64
windows/downloads
key: win-${{ hashFiles('windows/Makefile') }}
- name: Build all dependencies
shell: msys2 {0}
run: |
@ -56,7 +68,7 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: mkxp-z.windows.${{github.ref_name}}-${{github.sha}}
name: mkxp-z.windows.${{github.ref_name}}-${{steps.short-sha.outputs.sha}}
path: |
build/artifact/*.dll
build/artifact/*.exe
@ -64,12 +76,24 @@ jobs:
build/artifact/stdlib/
build-linux:
name: Linux x86_64
runs-on: ubuntu-latest
name: Ubuntu 22.04
runs-on: ubuntu-22.04
steps:
- uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
length: 6
- name: Checkout repository
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
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
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/
build-macos:
name: macOS
runs-on: macos-latest
steps:
- uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
length: 6
- name: Checkout repository
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
run: |
cd macos/Dependencies
@ -113,7 +151,7 @@ jobs:
- name: Build all dependencies
run: |
cd macos/Dependencies
./setup
./setup.sh
- name: Build app
run: |
@ -128,5 +166,5 @@ jobs:
- name: Upload archive
uses: actions/upload-artifact@v3
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

View file

@ -1,7 +1,9 @@
# mkxp-z
<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>
</b></p>

View file

@ -10,4 +10,4 @@ OPENAL_FLAGS := -DALSOFT_CPUEXT_NEON=no ${OPENAL_FLAGS}
OPENSSL_FLAGS := darwin64-$(ARCH)-cc
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
printf("Building libraries for Apple Silicon...\n")
printf("====================================================\n")
code = system("make everything -f .AppleSilicon")
code = system("make everything -f arm64.make")
return code if !code
end
printf("====================================================\n")
printf("Building libraries for Intel...\n")
printf("====================================================\n")
code = (system("make everything -f .Intel"))
code = (system("make everything -f x86_64.make"))
return code if !code
printf("====================================================\n")
printf("Performing post-setup...\n")
printf("====================================================\n")
printf("Creating universal libraries ...\n")
return system("./make_macuniversal")
return system("./make_macuniversal.sh")
end
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 )"
cd "$DIR/Dependencies"
./setup
./setup.sh