From b79881aadabaf761f81f5aa410abb05aa5ceabdc Mon Sep 17 00:00:00 2001 From: Struma Date: Thu, 4 May 2023 14:30:42 -0400 Subject: [PATCH] more workflow changes, put them in README --- .github/workflows/autobuild.yml | 52 ++++++++++++++++--- README.md | 4 +- .../{.AppleSilicon => arm64.make} | 2 +- .../{dependencies.make => common.make} | 0 ...make_macuniversal => make_macuniversal.sh} | 0 macos/Dependencies/{setup => setup.sh} | 6 +-- macos/Dependencies/{.Intel => x86_64.make} | 2 +- macos/setup.command | 2 +- 8 files changed, 54 insertions(+), 14 deletions(-) rename macos/Dependencies/{.AppleSilicon => arm64.make} (92%) rename macos/Dependencies/{dependencies.make => common.make} (100%) rename macos/Dependencies/{make_macuniversal => make_macuniversal.sh} (100%) rename macos/Dependencies/{setup => setup.sh} (91%) rename macos/Dependencies/{.Intel => x86_64.make} (91%) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 1c6b2330..ffca3eaf 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 58ab9ee6..e16f644d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # mkxp-z

- Downloads + Releases + ・ + Automatic BuildsDocumentation

diff --git a/macos/Dependencies/.AppleSilicon b/macos/Dependencies/arm64.make similarity index 92% rename from macos/Dependencies/.AppleSilicon rename to macos/Dependencies/arm64.make index a219fd57..033e2a2e 100644 --- a/macos/Dependencies/.AppleSilicon +++ b/macos/Dependencies/arm64.make @@ -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 diff --git a/macos/Dependencies/dependencies.make b/macos/Dependencies/common.make similarity index 100% rename from macos/Dependencies/dependencies.make rename to macos/Dependencies/common.make diff --git a/macos/Dependencies/make_macuniversal b/macos/Dependencies/make_macuniversal.sh similarity index 100% rename from macos/Dependencies/make_macuniversal rename to macos/Dependencies/make_macuniversal.sh diff --git a/macos/Dependencies/setup b/macos/Dependencies/setup.sh similarity index 91% rename from macos/Dependencies/setup rename to macos/Dependencies/setup.sh index 3d0c43a4..43b859a6 100755 --- a/macos/Dependencies/setup +++ b/macos/Dependencies/setup.sh @@ -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) diff --git a/macos/Dependencies/.Intel b/macos/Dependencies/x86_64.make similarity index 91% rename from macos/Dependencies/.Intel rename to macos/Dependencies/x86_64.make index b958f998..a8f18490 100644 --- a/macos/Dependencies/.Intel +++ b/macos/Dependencies/x86_64.make @@ -12,4 +12,4 @@ RUBY_FLAGS := ${RUBY_FLAGS} -include dependencies.make +include common.make diff --git a/macos/setup.command b/macos/setup.command index 5e53039b..5b2df7f0 100755 --- a/macos/setup.command +++ b/macos/setup.command @@ -4,4 +4,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$DIR/Dependencies" -./setup \ No newline at end of file +./setup.sh \ No newline at end of file