Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 43 additions & 58 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
@@ -1,84 +1,69 @@
name: CI
name: Build toolchain

on:
push:
pull_request:
repository_dispatch:
types: [run_build]
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, ubuntu-18.04]
os: [ ubuntu-latest, macos-latest ]

steps:
- uses: actions/checkout@v2

- name: Install Ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
- name: Checkout
uses: actions/checkout@v3

- name: Setup environment variables
run: |
sudo apt-get update
sudo apt-get -y install texinfo bison flex findutils ninja-build

- name: Install Ubuntu 18.04 dependencies
if: matrix.os == 'ubuntu-18.04'
# export first to set globally for $path
export ORBISDEV=$PWD/orbisdev
echo "ORBISDEV=$PWD/orbisdev" >> $GITHUB_ENV
echo "PATH=$ORBISDEV/bin:$PATH" >> $GITHUB_ENV

- name: Install Ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install texinfo bison flex findutils ninja-build

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install libgmp-dev bison flex make texinfo wget m4 cmake findutils ninja-build clang g++ dotnet-runtime-3.1 dotnet-sdk-3.1

- name: Install Mac dependencies
if: matrix.os == 'macOS-latest'
if: runner.os == 'macOS'
run: |
brew update
brew install texinfo bison flex ninja

- name: Runs all the stages in the shell
run: |
export ORBISDEV=$PWD/orbisdev
export PATH=$ORBISDEV/bin:$PATH
./build-all.sh
run: ./build-all.sh

- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- name: Compress orbisdev folder
run: |
tar -zcvf orbisdev.tar.gz orbisdev

- uses: actions/upload-artifact@v2
with:
name: orbisdev-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
path: orbisdev.tar.gz

- name: Rename orbisdev.tar.gz file
run: |
mv orbisdev.tar.gz orbisdev-${{matrix.os}}.tar.gz
run: tar -zcvf orbisdev-${{matrix.os}}.tar.gz orbisdev

- name: Extract tag name
if: startsWith(github.ref, 'refs/tags/')
id: tag
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Create pre-release
if: github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v1
with:
files: orbisdev-${{matrix.os}}.tar.gz
prerelease: true
name: "Development build"
tag_name: "latest"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
- name: Upload for Release
uses: actions/upload-artifact@v3
with:
files: orbisdev-${{matrix.os}}.tar.gz
tag_name: ${{ steps.tag.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: orbisdev-${{matrix.os}}.tar.gz
if-no-files-found: error
retention-days: 1

publish:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download artifacts
uses: actions/download-artifact@v3

- name: Push release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create 1.0${{ GITHUB.RUN_NUMBER }} artifact/*.tar.gz --target ${{ GITHUB.SHA }} -t 1.0${{ GITHUB.RUN_NUMBER }}
71 changes: 53 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,76 @@ These scripts download (`git clone`) and install:
- [orbisdev-liborbis](https://github.com/orbisdev/orbisdev-liborbis "orbisdev-liborbis")
- [orbisdev-raylib](https://github.com/orbisdev/orbisdev-raylib "orbisdev-raylib")

## Requirements
## Installation (From Release Archive)

1. Install clang, make, patch, git, texinfo wget, bison, flex, dotnet (3.1) and m4 if you don't have those.
1. Download from [Release](../../releases/latest) Page for your OS of choice.
2. Extract it. `tar -zxvf orbisdev-ubuntu-latest.tar.gz`
3. Add it to your login script.

```
export ORBISDEV= # your path to orbisdev folder
export PATH=$ORBISDEV/bin:$PATH
```

4. Install `make python2 dotnet-runtime-3.1 dotnet-sdk-3.1`

```sh
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install -y make python2 dotnet-runtime-3.1 dotnet-sdk-3.1
```

5. Make some homebrew!!

## Installation (Manual Build)

1. Install clang, g++, gmp, make, patch, git, texinfo wget, bison, flex, dotnet (runtime and sdk 3.1) and m4 if you don't have those.

```
# Example: Setup for Ubuntu 20.04 via WSL
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install libgmp-dev bison flex make texinfo wget m4 cmake findutils ninja-build clang g++ dotnet-runtime-3.1 dotnet-sdk-3.1
```

2. Add this to your login script (example: `~/.bash_profile`)

2. Add this to your login script (example: ~/.bash_profile)
```
export ORBISDEV=/usr/local/orbisdev
export PATH=$ORBISDEV/bin:$PATH
#change to your nfs root path
# (optional)
# change to your nfs root path
export SELF_PATH_INSTALL=/usr/local/orbisdev/git/ps4sh/bin/hostapp
#change to your server ip
# change to your server ip
export DEBUGNET_PC_IP=192.168.1.12
```

3. Run build-all.sh
```
./build-all.sh
```
3. Run `./build-all.sh`

## Docker generation
This repo also uses CI/CD to create a docker image called `orbisdev/orbisdev:latest`per change. This is quite useful if you're a developer that want to create/port an application to the PS4. So, you just can go there and compile your project using this docker image.

## Extra steps
If you want, you *JUST* can install the extra tools for generating pkg, to achieve this just execute
This repo also uses CI/CD to create a docker image called `orbisdev/orbisdev:latest` per change. This is quite useful if you're a developer that want to create/port an application to the PS4. So, you just can go there and compile your project using this docker image.

```
./build-extra.sh
```
## Extra steps
If you want, you can *JUST* install the extra tools for generating pkg, to achieve this just execute `./build-extra.sh`

## HELP
How to install the specific version of the dotnet 3.1 in :
- OSX: [homebrew-dotnet-sdk-versions](https://github.com/isen-ng/homebrew-dotnet-sdk-versions "homebrew-dotnet-sdk-versions")
- Ubuntu: [dotnet](https://docs.microsoft.com/es-es/dotnet/core/install/linux-ubuntu "dotnet")
- From source code:
```bash
- Ubuntu: [dotnet](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu "dotnet")

```
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install -y dotnet-runtime-3.1 dotnet-sdk-3.1
```

- From source code:

```
wget https://dot.net/v1/dotnet-install.sh && chmod 755 dotnet-install.sh && ./dotnet-install.sh -c Current --install-dir ~/cli
```
## Thanks