Skip to content

Commit

Permalink
Try #764: --target powerpc-unknown-linux-gnu --target x86_64-unknown-…
Browse files Browse the repository at this point in the history
…linux-gnu.2.17
  • Loading branch information
bors[bot] authored Jun 7, 2022
2 parents 42cea7d + b1d187a commit 4a0e05d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
selects=()
for target in "${targets[@]}"; do
selects+=(".target == \"${target}\"")
selects+=(".target + (if .sub then \".\" + .sub else \"\" end) == \"${target}\"")
done
query=$(printf " or %s" "${selects[@]}")
query="${query:4}"
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
}}
matrix: |
- { target: x86_64-apple-darwin, os: macos-10.15, cpp: 1, dylib: 1, std: 1, run: 1, deploy: true }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: native qemu-user qemu-system, deploy: true }
- { target: x86_64-unknown-linux-gnu, sub: "2.17", os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: native qemu-user qemu-system, deploy: true }
- { target: x86_64-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1, deploy: true }
- { target: x86_64-pc-windows-msvc, os: windows-2019, cpp: 1, std: 1, run: 1, deploy: true }
Expand Down Expand Up @@ -209,9 +209,10 @@ jobs:
id: build-docker-image
if: runner.os == 'Linux'
timeout-minutes: 60
run: ./build-docker-image.sh "${TARGET}"
run: ./build-docker-image.sh "${TARGET}${SUB+.$SUB}"
env:
TARGET: ${{ matrix.target }}
SUB: ${{ matrix.sub }}
shell: bash
- name: Set Docker image for test
if: steps.build-docker-image.outputs.image
Expand Down
16 changes: 9 additions & 7 deletions build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ pushd docker
run() {
local push="${1}"
local build_args=()

echo "${1} - ${2}"
if "${push}"; then
build_args+=(--push)
else
build_args+=(--load)
fi

local dockerfile="Dockerfile.${2}"
local image_name="ghcr.io/cross-rs/${2}"
local name=${2%%.*}
local suffix=${2#*.}
local image_name="ghcr.io/cross-rs/${name}"

local tags=()

Expand All @@ -45,14 +47,14 @@ run() {

# Tag stable versions as latest.
if ! [[ "${tag_version}" =~ -.* ]]; then
tags+=("${image_name}:latest")
tags+=("${image_name}:latest${suffix:+-${suffix}}")
fi
;;
branch:*)
# Tag active branch as edge.
tags+=("${image_name}:${GITHUB_REF_NAME}")
tags+=("${image_name}:${GITHUB_REF_NAME}${suffix:+-${suffix}}")
if ! [[ "${GITHUB_REF_NAME-}" =~ staging ]] && ! [[ "${GITHUB_REF_NAME-}" =~ trying ]]; then
tags+=("${image_name}:edge")
tags+=("${image_name}:edge${suffix:+-${suffix}}")
fi
;;
*)
Expand All @@ -62,13 +64,13 @@ run() {
fi

# Local development.
tags+=("${image_name}:local")
tags+=("${image_name}:local${suffix:+-${suffix}}")
;;
esac

build_args+=(
--pull
--cache-from "type=registry,ref=${image_name}:main"
--cache-from "type=registry,ref=${image_name}:main${suffix:+-${suffix}}"
)

if "${push}"; then
Expand Down
File renamed without changes.

0 comments on commit 4a0e05d

Please sign in to comment.