Skip to content

Commit d00acf1

Browse files
committed
Fix errors in scripts/*
1 parent a273aea commit d00acf1

30 files changed

+169
-131
lines changed

.github/workflows/build_push.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
ShellCheck:
13+
name: Shellcheck
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: ShellCheck Depends
18+
uses: ludeeus/action-shellcheck@master
19+
Docker:
20+
name: Docker
21+
runs-on: ubuntu-latest
22+
needs: ShellCheck
23+
steps:
24+
- name: Checkout
25+
if: success()
26+
id: checkout
27+
uses: actions/checkout@v2
28+
- name: Set up QEMU
29+
if: success()
30+
uses: docker/setup-qemu-action@v1
31+
- name: Set up Docker Buildx
32+
if: success()
33+
id: buildx
34+
uses: docker/setup-buildx-action@v1
35+
- name: Cache Docker layers
36+
uses: actions/cache@v2
37+
with:
38+
path: /tmp/.buildx-cache
39+
key: ${{ runner.os }}-buildx-${{ github.sha }}
40+
restore-keys: |
41+
${{ runner.os }}-buildx-
42+
- name: Prepare
43+
if: success()
44+
id: prepare
45+
run: |
46+
echo ::set-output name=docker_platforms::linux/amd64,linux/386
47+
echo ::set-output name=docker_username::miigotu
48+
echo ::set-output name=github_image::ghcr.io/${GITHUB_REPOSITORY,,}/ps3dev
49+
VERSION_TAG=${GITHUB_REF#refs/*/}
50+
echo ::set-output name=version::${VERSION_TAG%/merge}
51+
# - name: Login to DockerHub
52+
# if: success()
53+
# id: login_docker
54+
# uses: docker/login-action@v1
55+
# with:
56+
# username: ${{ secrets.DOCKERHUB_USERNAME }}
57+
# password: ${{ secrets.DOCKERHUB_TOKEN }}
58+
- name: Login to GitHub Container Registry
59+
if: success()
60+
id: login_github
61+
uses: docker/login-action@v1
62+
with:
63+
registry: ghcr.io
64+
username: ${{ steps.prepare.outputs.docker_username }}
65+
password: ${{ secrets.GITHUB_TOKEN }}
66+
- name: Build and push (master)
67+
if: success() && steps.prepare.outputs.version == 'master' && github.event_name != 'pull_request'
68+
id: build_push_master
69+
uses: docker/build-push-action@v2
70+
with:
71+
context: .
72+
platforms: ${{ steps.prepare.outputs.docker_platforms }}
73+
push: true
74+
tags: |
75+
${{ steps.prepare.outputs.github_image }}:master
76+
${{ steps.prepare.outputs.github_image }}:latest
77+
- name: Build and push (development)
78+
if: success() && steps.prepare.outputs.version != 'master'
79+
id: build_push_development
80+
uses: docker/build-push-action@v2
81+
with:
82+
context: .
83+
platforms: ${{ steps.prepare.outputs.docker_platforms }}
84+
push: true
85+
tags: |
86+
${{ steps.prepare.outputs.github_image }}:${{ steps.prepare.outputs.version }}
87+
cache-from: type=local,src=/tmp/.buildx-cache
88+
cache-to: type=local,dest=/tmp/.buildx-cache-new
89+
- name: Move cache
90+
if: success()
91+
# Temp fix
92+
# https://github.com/docker/build-push-action/issues/252
93+
# https://github.com/moby/buildkit/issues/1896
94+
run: |
95+
rm -rf /tmp/.buildx-cache
96+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

.github/workflows/deploy.yaml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/shellcheck.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:focal
1+
FROM debian:buster-slim
22
LABEL maintainer="[email protected]"
33

44
ENV PS3DEV /usr/local/ps3dev
@@ -9,9 +9,9 @@ ENV DEBIAN_FRONTEND=noninteractive
99

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

depends/check-autoconf.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
# check-autoconf.sh by Naomi Peori ([email protected])
33

44
## Check for autoconf.
5-
autoconf --version 1>/dev/null 2>&1 || { echo "ERROR: Install autoconf before continuing."; exit 1; }
5+
autoconf --version 1>/dev/null 2>&1 ||
6+
{ echo "ERROR: Install autoconf before continuing."; exit 1; }
7+
# sudo apt-get install autoconf

depends/check-automake.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
## Check for automake.
55
automake --version 1>/dev/null 2>&1 ||
66
{ echo "ERROR: Install automake before continuing."; exit 1; }
7+
# sudo apt-get install automake

depends/check-bison.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
( bison -V || yacc -V ) 1>/dev/null 2>&1 ||
55
{ echo "ERROR: Install bison before continuing."; exit 1; }
6+
# sudo apt-get install bison

depends/check-flex.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
## Check for flex.
55
flex --version 1>/dev/null 2>&1 ||
66
{ echo "ERROR: Install flex before continuing."; exit 1; }
7+
# sudo apt-get install flex

depends/check-gcc.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
## Check for gcc.
55
gcc --version 1>/dev/null 2>&1 ||
66
{ echo "ERROR: Install gcc before continuing."; exit 1; }
7+
# sudo apt-get install gcc

depends/check-gmp.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/bin/sh
22
# check-gmp.sh by Timothy Redaelli ([email protected])
33

4+
# i386 dumpmachine returns i686-linux-gnu
5+
echo $(gcc -dumpmachine)
46
[ -f /usr/include/"$(gcc -dumpmachine)"/gmp.h ] ||
7+
[ -f /usr/include/i386-linux-gnu/gmp.h ] ||
58
[ -f /usr/include/gmp.h ] ||
69
[ -f /opt/local/include/gmp.h ] ||
710
[ -f /usr/local/include/gmp.h ] ||
811
[ -f /opt/csw/include/gmp.h ] ||
912
{ echo "ERROR: Install gmp before continuing."; exit 1; }
13+
# sudo apt-get install libgmp-dev

0 commit comments

Comments
 (0)