ref: 0f86084e08c20bbba44c60c981776c54e7101aab
parent: c8e602dec130aba90f46cd462731b53e7e3e3820
author: ISSOtm <[email protected]>
date: Sun Oct 16 07:10:15 EDT 2022
Rename `actions` folder as `scripts` It's clearer this way.
--- a/.github/actions/install.sh
+++ /dev/null
@@ -1,6 +1,0 @@
-#!/bin/bash
-install -d /usr/local/bin/ /usr/local/share/man/man1/ /usr/local/share/man/man5/ /usr/local/share/man/man7/
-install -s -m 755 rgbasm rgblink rgbfix rgbgfx /usr/local/bin/
-install -m 644 rgbasm.1 rgblink.1 rgbfix.1 rgbgfx.1 /usr/local/share/man/man1/
-install -m 644 rgbds.5 rgbasm.5 rgblink.5 /usr/local/share/man/man5/
-install -m 644 rgbds.7 gbz80.7 /usr/local/share/man/man7/
--- a/.github/actions/install_deps.sh
+++ /dev/null
@@ -1,21 +1,0 @@
-#!/bin/bash
-set -e
-
-case "${1%-*}" in
- ubuntu)
- sudo apt-get -qq update
- sudo apt-get install -yq bison libpng-dev pkg-config
- ;;
- macos)
- brew install bison libpng pkg-config md5sha1sum
- # For the version check below exclusively, re-do this before building
- export PATH="/usr/local/opt/bison/bin:$PATH"
- ;;
- *)
- echo "WARNING: Cannot install deps for OS '$1'"
- ;;
-esac
-
-bison --version
-make --version
-cmake --version
--- a/.github/actions/mingw-w64-libpng-dev.sh
+++ /dev/null
@@ -1,34 +1,0 @@
-#!/bin/sh
-
-set -e
-
-pngver=1.6.37
-arch="$1"
-
-## Grab sources and check them
-
-wget http://downloads.sourceforge.net/project/libpng/libpng16/$pngver/libpng-$pngver.tar.xz
-wget http://downloads.sourceforge.net/project/apng/libpng/libpng16/libpng-$pngver-apng.patch.gz
-sha256sum -c .github/actions/mingw-w64-libpng-dev.sha256sums
-
-## Extract sources and patch them
-
-tar -xf libpng-$pngver.tar.xz
-gunzip libpng-$pngver-apng.patch.gz
-
-# Patch in apng support
-env -C libpng-$pngver patch -p0 ../libpng-$pngver-apng.patch
-
-## Start building!
-
-mkdir -p build
-cd build
-../libpng-$pngver/configure \
- --host="$arch" --target="$arch" \
- --prefix="/usr/$arch" \
- --enable-shared --disable-static \
- CPPFLAGS="-D_FORTIFY_SOURCE=2" \
- CFLAGS="-O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4" \
- LDFLAGS="-Wl,-O1,--sort-common,--as-needed -fstack-protector"
-make -kj
-make install
--- a/.github/actions/mingw-w64-libpng-dev.sha256sums
+++ /dev/null
@@ -1,2 +1,0 @@
-10d9e0cb60e2b387a79b355eb7527c0bee2ed8cbd12cf04417cabc4d6976683c libpng-1.6.37-apng.patch.gz
-505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-1.6.37.tar.xz
--- /dev/null
+++ b/.github/scripts/install.sh
@@ -1,0 +1,6 @@
+#!/bin/bash
+install -d /usr/local/bin/ /usr/local/share/man/man1/ /usr/local/share/man/man5/ /usr/local/share/man/man7/
+install -s -m 755 rgbasm rgblink rgbfix rgbgfx /usr/local/bin/
+install -m 644 rgbasm.1 rgblink.1 rgbfix.1 rgbgfx.1 /usr/local/share/man/man1/
+install -m 644 rgbds.5 rgbasm.5 rgblink.5 /usr/local/share/man/man5/
+install -m 644 rgbds.7 gbz80.7 /usr/local/share/man/man7/
--- /dev/null
+++ b/.github/scripts/install_deps.sh
@@ -1,0 +1,21 @@
+#!/bin/bash
+set -e
+
+case "${1%-*}" in
+ ubuntu)
+ sudo apt-get -qq update
+ sudo apt-get install -yq bison libpng-dev pkg-config
+ ;;
+ macos)
+ brew install bison libpng pkg-config md5sha1sum
+ # For the version check below exclusively, re-do this before building
+ export PATH="/usr/local/opt/bison/bin:$PATH"
+ ;;
+ *)
+ echo "WARNING: Cannot install deps for OS '$1'"
+ ;;
+esac
+
+bison --version
+make --version
+cmake --version
--- /dev/null
+++ b/.github/scripts/mingw-w64-libpng-dev.sh
@@ -1,0 +1,34 @@
+#!/bin/sh
+
+set -e
+
+pngver=1.6.37
+arch="$1"
+
+## Grab sources and check them
+
+wget http://downloads.sourceforge.net/project/libpng/libpng16/$pngver/libpng-$pngver.tar.xz
+wget http://downloads.sourceforge.net/project/apng/libpng/libpng16/libpng-$pngver-apng.patch.gz
+sha256sum -c .github/scripts/mingw-w64-libpng-dev.sha256sums
+
+## Extract sources and patch them
+
+tar -xf libpng-$pngver.tar.xz
+gunzip libpng-$pngver-apng.patch.gz
+
+# Patch in apng support
+env -C libpng-$pngver patch -p0 ../libpng-$pngver-apng.patch
+
+## Start building!
+
+mkdir -p build
+cd build
+../libpng-$pngver/configure \
+ --host="$arch" --target="$arch" \
+ --prefix="/usr/$arch" \
+ --enable-shared --disable-static \
+ CPPFLAGS="-D_FORTIFY_SOURCE=2" \
+ CFLAGS="-O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4" \
+ LDFLAGS="-Wl,-O1,--sort-common,--as-needed -fstack-protector"
+make -kj
+make install
--- /dev/null
+++ b/.github/scripts/mingw-w64-libpng-dev.sha256sums
@@ -1,0 +1,2 @@
+10d9e0cb60e2b387a79b355eb7527c0bee2ed8cbd12cf04417cabc4d6976683c libpng-1.6.37-apng.patch.gz
+505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-1.6.37.tar.xz
--- a/.github/workflows/create-release-artifacts.yaml
+++ b/.github/workflows/create-release-artifacts.yaml
@@ -99,7 +99,7 @@
- name: Install deps
shell: bash
run: |
- ./.github/actions/install_deps.sh macos-latest
+ ./.github/scripts/install_deps.sh macos-latest
# We force linking libpng statically; the other libs are provided by macOS itself
- name: Build binaries
run: |
@@ -107,7 +107,7 @@
make -j WARNFLAGS="-Wall -Wextra -mmacosx-version-min=10.9" PKG_CONFIG="pkg-config --static" PNGLDLIBS="$(pkg-config --static --libs-only-L libpng | cut -c 3-)/libpng.a $(pkg-config --static --libs-only-l libpng | sed s/-lpng[0-9]*//g)" Q=
- name: Package binaries
run: |
- zip --junk-paths rgbds-${{ env.version }}-macos-x86-64.zip rgb{asm,link,fix,gfx} man/* .github/actions/install.sh
+ zip --junk-paths rgbds-${{ env.version }}-macos-x86-64.zip rgb{asm,link,fix,gfx} man/* .github/scripts/install.sh
- name: Upload macOS binaries
uses: actions/upload-artifact@v3
with:
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -28,7 +28,7 @@
- name: Install deps
shell: bash
run: |
- ./.github/actions/install_deps.sh ${{ matrix.os }}
+ ./.github/scripts/install_deps.sh ${{ matrix.os }}
# The `export` lines are to allow working on macOS...
# Apple's base version is severely outdated, not even supporting -Wall,
# but it overrides Homebrew's version nonetheless...
@@ -166,13 +166,13 @@
- name: Install deps
shell: bash
run: |
- ./.github/actions/install_deps.sh ${{ matrix.os }}
+ ./.github/scripts/install_deps.sh ${{ matrix.os }}
- name: Install MinGW
run: | # dpkg-dev is apparently required for pkg-config for cross-building
sudo apt-get install {gcc,g++}-mingw-w64-${{ matrix.arch }}-win32 mingw-w64-tools libz-mingw-w64-dev dpkg-dev
- name: Install libpng dev headers for MinGW
run: |
- sudo ./.github/actions/mingw-w64-libpng-dev.sh ${{ matrix.triplet }}
+ sudo ./.github/scripts/mingw-w64-libpng-dev.sh ${{ matrix.triplet }}
- name: Cross-build Windows binaries
run: |
make mingw${{ matrix.bits }} -j Q=