mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-19 01:19:26 +02:00
Compare commits
11 Commits
add_script
...
add_shellc
Author | SHA1 | Date | |
---|---|---|---|
04f84bc4ed | |||
cc5961492e | |||
55eb3b7c96 | |||
50b57169e7 | |||
8ce154f1b2 | |||
d02099ad95 | |||
92efe118b3 | |||
84e12b0f66 | |||
882a67b9d2 | |||
c1526555a5 | |||
cd5979a3c9 |
2
.github/workflows/expired.yml
vendored
2
.github/workflows/expired.yml
vendored
@ -6,7 +6,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v3
|
- uses: actions/stale@v4
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
exempt-issue-milestones: 'future,alpha,beta,release'
|
exempt-issue-milestones: 'future,alpha,beta,release'
|
||||||
|
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -42,7 +42,7 @@ jobs:
|
|||||||
image:
|
image:
|
||||||
name: ${{ matrix.arch_name }}
|
name: ${{ matrix.arch_name }}
|
||||||
needs: base
|
needs: base
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
28
.github/workflows/shellcheck.yml
vendored
Normal file
28
.github/workflows/shellcheck.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Shellcheck CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/README.md'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/README.md'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
shellcheck:
|
||||||
|
name: Shellcheck
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Run ShellCheck
|
||||||
|
uses: ludeeus/action-shellcheck@master
|
||||||
|
with:
|
||||||
|
severity: error
|
||||||
|
format: gcc
|
||||||
|
env:
|
||||||
|
SHELLCHECK_OPTS: -s bash
|
11
Makefile
11
Makefile
@ -50,6 +50,12 @@ endif
|
|||||||
# Tag images with date and Git short hash in addition to revision
|
# Tag images with date and Git short hash in addition to revision
|
||||||
TAG := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD)
|
TAG := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
|
# shellcheck executable
|
||||||
|
SHELLCHECK := shellcheck
|
||||||
|
|
||||||
|
# Defines the level of verification (error, warning, info...)
|
||||||
|
SHELLCHECK_SEVERITY_LEVEL := error
|
||||||
|
|
||||||
#
|
#
|
||||||
# images: This target builds all IMAGES (because it is the first one, it is built by default)
|
# images: This target builds all IMAGES (because it is the first one, it is built by default)
|
||||||
#
|
#
|
||||||
@ -275,6 +281,11 @@ purge: clean
|
|||||||
# Remove all images with organization (ex dockcross/*)
|
# Remove all images with organization (ex dockcross/*)
|
||||||
$(DOCKER) images --filter=reference='$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f
|
$(DOCKER) images --filter=reference='$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f
|
||||||
|
|
||||||
|
# Check bash syntax
|
||||||
|
bash-check:
|
||||||
|
find . -type f \( -name "*.sh" -o -name "*.bash" \) -print0 | xargs -0 -P"$(shell nproc)" -I{} \
|
||||||
|
$(SHELLCHECK) --check-sourced --color=auto --format=gcc --severity=error --shell=bash --enable=all "{}"
|
||||||
|
|
||||||
#
|
#
|
||||||
# testing implicit rule
|
# testing implicit rule
|
||||||
#
|
#
|
||||||
|
@ -13,4 +13,4 @@ RUN \
|
|||||||
rm -rf /buildscripts
|
rm -rf /buildscripts
|
||||||
|
|
||||||
# Runtime scripts
|
# Runtime scripts
|
||||||
COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/
|
COPY imagefiles/entrypoint.sh imagefiles/dockcross.sh /dockcross/
|
||||||
|
@ -6,11 +6,11 @@ DEFAULT_DOCKCROSS_IMAGE=dockcross/base # DO NOT MOVE THIS LINE (see entrypoint.
|
|||||||
# Helpers
|
# Helpers
|
||||||
#
|
#
|
||||||
err() {
|
err() {
|
||||||
echo -e >&2 ERROR: $@\\n
|
echo -e >&2 "ERROR: $*\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
err $@
|
err "$*"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
source $(dirname "$0")/functions/cmake_fn.sh
|
|
||||||
|
|
||||||
cmake_build $@
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
curl https://raw.githubusercontent.com/dockcross/dockcross/master/Makefile -o dockcross-Makefile
|
|
||||||
make -f dockcross-Makefile display_images
|
|
||||||
|
|
||||||
source $(dirname "$0")/functions/cmake_fn.sh
|
|
||||||
|
|
||||||
for image in $(make -f dockcross-Makefile display_images); do
|
|
||||||
cmake_build $image $@
|
|
||||||
done
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
cmake_build () {
|
|
||||||
local image=$1
|
|
||||||
local build_file=build-${image%:*}
|
|
||||||
shift 1
|
|
||||||
local cmake_arg=$@
|
|
||||||
echo "cmake arg: $cmake_arg"
|
|
||||||
|
|
||||||
echo "Pulling dockcross/$image"
|
|
||||||
docker pull dockcross/$image
|
|
||||||
echo "Make script dockcross-$image"
|
|
||||||
docker run --rm dockcross/$image > ./dockcross-$image
|
|
||||||
chmod +x ./dockcross-$image
|
|
||||||
echo "Build $build_file"
|
|
||||||
./dockcross-$image cmake -B$build_file -H. -GNinja $cmake_arg
|
|
||||||
./dockcross-$image ninja -C$build_file
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
makefile_build () {
|
|
||||||
local image=$1
|
|
||||||
shift 1
|
|
||||||
|
|
||||||
echo "Pulling dockcross/$image"
|
|
||||||
docker pull dockcross/$image
|
|
||||||
echo "Make script dockcross-$image"
|
|
||||||
docker run --rm dockcross/$image > ./dockcross-$image
|
|
||||||
chmod +x ./dockcross-$image
|
|
||||||
echo "Build..."
|
|
||||||
./dockcross-$image bash -c 'make CXX=$CXX CC=$CC AR=$AR AS=$AS CPP=$CPP FC=$FC'
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
source $(dirname "$0")/functions/makefile_fn.sh
|
|
||||||
|
|
||||||
makefile_build $@
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
curl https://raw.githubusercontent.com/dockcross/dockcross/master/Makefile -o dockcross-Makefile
|
|
||||||
make -f dockcross-Makefile display_images
|
|
||||||
|
|
||||||
source $(dirname "$0")/functions/makefile_fn.sh
|
|
||||||
|
|
||||||
for image in $(make -f dockcross-Makefile display_images); do
|
|
||||||
makefile_build $image $@
|
|
||||||
done
|
|
Reference in New Issue
Block a user