Skip to content

Commit

Permalink
Adding ARM support and put back Macports
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed May 2, 2024
1 parent ea9c49a commit 3f49f50
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/compilation.yml
Expand Up @@ -11,14 +11,18 @@ jobs:
runs-on: ${{ matrix.os[0] }}
strategy:
matrix:
os: [[macos-13, bash], [ubuntu-latest, bash]]
os: [
[macos-latest, arm64, bash],
[macos-13, x86_64, bash],
[ubuntu-latest, x86_64, bash]
]
fail-fast: false
defaults:
run:
shell: ${{ matrix.os[1] }} {0}
shell: ${{ matrix.os[2] }} {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name : Install dependencies on required OS
run: |
Expand All @@ -35,18 +39,18 @@ jobs:
- name: Prepare pspdev folder
run: |
tar -zcvf pspdev-${{matrix.os[0]}}.tar.gz pspdev
tar -zcvf pspdev-${{matrix.os[0]}}-${{matrix.os[1]}}.tar.gz pspdev
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pspdev-${{matrix.os[0]}}
path: pspdev-${{matrix.os[0]}}.tar.gz
name: pspdev-${{matrix.os[0]}}-${{matrix.os[1]}}
path: pspdev-${{matrix.os[0]}}-${{matrix.os[1]}}.tar.gz

- name: Create pre-release
if: ${{ github.ref == 'refs/heads/master' }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: pspdev-${{matrix.os[0]}}.tar.gz
files: pspdev-${{matrix.os[0]}}-${{matrix.os[1]}}.tar.gz
prerelease: true
name: "Development build"
tag_name: "latest"
Expand All @@ -55,9 +59,9 @@ jobs:

- name: Release
if: ${{ github.ref_type == 'tag' }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: pspdev-${{matrix.os[0]}}.tar.gz
files: pspdev-${{matrix.os[0]}}-${{matrix.os[1]}}.tar.gz
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -71,7 +75,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies Fedora
if: ${{ matrix.container[0] == 'fedora' }}
Expand All @@ -88,14 +92,14 @@ jobs:
run: |
tar -zcvf pspdev-${{matrix.container[0]}}-${{matrix.container[1]}}.tar.gz pspdev
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pspdev-${{matrix.container[0]}}-${{matrix.container[1]}}
path: pspdev-${{matrix.container[0]}}-${{matrix.container[1]}}.tar.gz

- name: Create pre-release
if: ${{ github.ref == 'refs/heads/master' }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: pspdev-${{matrix.container[0]}}-${{matrix.container[1]}}.tar.gz
prerelease: true
Expand All @@ -106,7 +110,7 @@ jobs:

- name: Release
if: ${{ github.ref_type == 'tag' }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: pspdev-${{matrix.container[0]}}-${{matrix.container[1]}}.tar.gz
tag_name: ${{ github.ref_name }}
Expand Down
11 changes: 9 additions & 2 deletions prepare.sh
Expand Up @@ -3,10 +3,17 @@
echo "Detecting OS and installing packages required for PSP Toolchain"

#Handle macOS first
if [[ $(uname) = "Darwin" ]]; then
if [ "$(uname -s)" = "Darwin" ]; then
## Check if using brew
if command -v brew &> /dev/null; then
brew update
brew install gettext texinfo bison flex gnu-sed ncurses gsl gmp mpfr autoconf automake cmake libusb-compat libarchive gpgme bash openssl libtool

brew reinstall openssl # https://github.com/Homebrew/homebrew-core/issues/169728#issuecomment-2074958306
fi
## Check if using MacPorts
if command -v port &> /dev/null; then
sudo port install autoconf automake cmake doxygen gsed libelf libtool pkgconfig
fi
else

TESTOS=$(cat /etc/os-release | grep -w "ID" | cut -d '=' -f2)
Expand Down

0 comments on commit 3f49f50

Please sign in to comment.