Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submodules #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.git/
#.git/
build/
30 changes: 17 additions & 13 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
Docker:
Expand All @@ -15,8 +12,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 1
persist-credentials: false
submodules: recursive
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
with:
remote: true
- name: Set up Docker Buildx
if: success()
id: buildx
Expand All @@ -28,9 +31,11 @@ jobs:
if: success()
id: prepare
run: |
echo ::set-output name=docker_platforms::linux/amd64,linux/386
echo ::set-output name=docker_username::miigotu
# echo ::set-output name=docker_platforms::linux/amd64,linux/386
echo ::set-output name=docker_platforms::linux/amd64
echo ::set-output name=github_image::docker.pkg.github.com/${GITHUB_REPOSITORY,,}/ps3dev
# echo ::set-output name=docker_image::docker.io/${GITHUB_REPOSITORY,,}
echo ::set-output name=docker_image::docker.io/ps3dev/ps3dev
VERSION_TAG=${GITHUB_REF#refs/*/}
echo ::set-output name=version::${VERSION_TAG%/merge}
- name: Available platforms
Expand All @@ -39,13 +44,12 @@ jobs:
- name: Docker Login and set build command
if: success()
id: login
env:
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "${GITHUB_PASSWORD}" | docker login --username "${{ steps.prepare.outputs.docker_username }}" --password-stdin docker.pkg.github.com
echo ::set-output name=buildx::$(echo docker buildx build --output type=image,name=${{ steps.prepare.outputs.github_image }},push=true \
# echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u "${{ github.actor }}" --password-stdin docker.io
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin docker.io
echo ::set-output name=buildx::$(echo docker buildx build --output type=image,push=true \
--platform ${{ steps.prepare.outputs.docker_platforms }} --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" \
--tag "${{ steps.prepare.outputs.github_image }}:${{ steps.prepare.outputs.version }}")
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}")
- name: Cache Docker layers
uses: actions/cache@v2
id: cache
Expand All @@ -55,11 +59,11 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
- name: Run Buildx (master)
if: success() && steps.prepare.outputs.version == 'master' && github.event_name != 'pull_request'
if: success() && steps.prepare.outputs.version == 'master'
run: |
${{ steps.login.outputs.buildx }} --tag "${{ steps.prepare.outputs.github_image }}:latest" --file Dockerfile .
${{ steps.login.outputs.buildx }} --tag "${{ steps.prepare.outputs.docker }}:latest" --file Dockerfile .
- name: Run Buildx (non-master)
if: success() && steps.prepare.outputs.version != 'master' && github.event_name != 'pull_request'
if: success() && steps.prepare.outputs.version != 'master'
run: |
${{ steps.login.outputs.buildx }} --file Dockerfile .
- name: Clear
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/github_pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Docker Image to GitHub
on:
push:
branches:
- "submodules"
- "master"

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 1
persist-credentials: false
submodules: recursive
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
with:
remote: true
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: miigotu/ps3toolchain/ps3dev
tag_with_ref: true
29 changes: 29 additions & 0 deletions .github/workflows/update_submodules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Submodule Updater

on:
pull_request:
push:
branches:
- "submodules"

jobs:
Submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 1
persist-credentials: false
submodules: recursive
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
with:
remote: true
- uses: EndBug/add-and-commit@v4
with:
message: Update submodules
add: src
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build/
.idea/**
*.patch
*.diff
28 changes: 28 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[submodule "newlib"]
path = src/newlib-1.20.0
url = git://github.com/ps3dev/newlib-1.20.0-PS3.git
shallow = true
[submodule "binutils"]
path = src/binutils-2.22
url = git://github.com/ps3dev/binutils-2.22-PS3.git
shallow = true
[submodule "PSL1GHT"]
path = src/PSL1GHT
url = git://github.com/ps3dev/PSL1GHT.git
shallow = true
[submodule "ps3libraries"]
path = src/ps3libraries
url = git://github.com/ps3dev/ps3libraries.git
shallow = true
[submodule "config"]
path = src/config
url = git://git.savannah.gnu.org/config.git
shallow = true
[submodule "gdb"]
path = src/gdb-7.5.1
url = git://github.com/miigotu/gdb-7.5.1-PS3.git
shallow = true
[submodule "gcc"]
path = src/gcc-PS3
url = git://github.com/ps3dev/gcc-PS3.git
shallow = true
35 changes: 16 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
FROM ubuntu:xenial
FROM ubuntu:latest
LABEL maintainer="[email protected]"

ENV PS3DEV /usr/local/ps3dev
ENV PSL1GHT ${PS3DEV}
ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin

ENV PSL1GHT /usr/local/ps3dev
ENV PATH $PATH:/usr/local/ps3dev/bin:/usr/local/ps3dev/ppu/bin:/usr/local/ps3dev/spu/bin
ENV PS3TOOLCHAIN /ps3_toolchain
ENV DEBIAN_FRONTEND=noninteractive

RUN \
apt-get -y update && \
apt-get -y install \
autoconf bison build-essential ca-certificates flex git libelf-dev\
libgmp-dev libncurses5-dev libssl-dev libtool-bin pkg-config python-dev \
texinfo wget zlib1g-dev && \
apt-get -y clean autoclean autoremove && \
rm -rf /var/lib/{apt,dpkg,cache,log}/

RUN mkdir /build
WORKDIR /build
COPY . /build
RUN apt-get -yq update && \
apt-get -y install autoconf bison build-essential flex git libelf-dev \
libgmp3-dev libncurses5-dev libssl-dev libtool-bin pkg-config python-dev texinfo wget zlib1g-dev && \
apt-get -y clean autoclean autoremove && \
find /var/cache/apt/archives /var/lib/apt/lists /var/lib/dpkg /var/log -not -name lock -type f -delete

# Fixes certificate errors with letsencrypt in ARMv7
RUN echo "\nca_certificate=/etc/ssl/certs/ca-certificates.crt" | tee -a /etc/wgetrc
RUN /build/toolchain.sh
RUN mkdir $PS3TOOLCHAIN $PS3DEV
WORKDIR $PS3TOOLCHAIN
COPY . .
VOLUME $PS3DEV
RUN $PS3TOOLCHAIN/toolchain.sh
RUN rm -rf $PS3TOOLCHAIN
CMD /bin/bash

3 changes: 2 additions & 1 deletion depends/check-gmp.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# check-gmp.sh by Timothy Redaelli ([email protected])
set -x

[ -f /usr/include/$(gcc -dumpmachine)/gmp.h -o -f /usr/include/gmp.h -o -f /opt/local/include/gmp.h -o -f /usr/local/include/gmp.h -o -f /opt/csw/include/gmp.h ] || { echo "ERROR: Install gmp before continuing."; exit 1; }
([ -f /usr/include/$(gcc -dumpmachine)/gmp.h ] || [ -f /usr/include/gmp.h ] || [ -f /opt/local/include/gmp.h ] || [ -f /usr/local/include/gmp.h ] || [ -f /opt/csw/include/gmp.h ]) || { echo "ERROR: Install gmp before continuing."; exit 1; }
15 changes: 0 additions & 15 deletions patches/binutils-2.22-PS3.patch

This file was deleted.

Loading