Skip to content

Commit

Permalink
Break out Linux bootstrap into its own environment
Browse files Browse the repository at this point in the history
We want to do bootstrap in a completely Pony free environment. Previously,
it was being done in an environment that had Pony installed. It probably
wouldn't ever be a problem, but this is a better test setup.
  • Loading branch information
SeanTAllen committed Dec 28, 2019
1 parent a9849b3 commit a820564
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .ci-dockerfiles/alpine-bootstrap-tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:3.11

RUN apk update \
&& apk upgrade \
&& apk add --update \
build-base \
curl \
git \
libressl-dev \
make
15 changes: 15 additions & 0 deletions .ci-dockerfiles/alpine-bootstrap-tester/build-and-push.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -o errexit
set -o nounset

#
# *** You should already be logged in to DockerHub when you run this ***
#

TODAY=$(date +%Y%m%d)
DOCKERFILE_DIR="$(dirname "$0")"

docker build --pull -t "ponylang/ponyup-ci-alpine-bootstrap-tester:${TODAY}" \
"${DOCKERFILE_DIR}"
docker push "ponylang/ponyup-ci-alpine-bootstrap-tester:${TODAY}"
10 changes: 10 additions & 0 deletions .ci-dockerfiles/ubuntu-bootstrap-tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:18.04

RUN apt-get update \
&& apt-get upgrade \
&& apt-get install -y \
gcc \
curl \
git \
libssl-dev \
make
15 changes: 15 additions & 0 deletions .ci-dockerfiles/ubuntu-bootstrap-tester/build-and-push.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -o errexit
set -o nounset

#
# *** You should already be logged in to DockerHub when you run this ***
#

TODAY=$(date +%Y%m%d)
DOCKERFILE_DIR="$(dirname "$0")"

docker build --pull -t "ponylang/ponyup-ci-ubuntu-bootstrap-tester:${TODAY}" \
"${DOCKERFILE_DIR}"
docker push "ponylang/ponyup-ci-ubuntu-bootstrap-tester:${TODAY}"
9 changes: 1 addition & 8 deletions .ci-scripts/test-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#!/bin/sh

rm -rf \
/usr/local/bin/ponyc \
/usr/local/bin/stable \
/usr/local/lib/x86-64/libpony* \
/usr/local/include/pony* \
/usr/local/packages

cat ponyup-init.sh | sh -s -- --prefix=/usr/local
cat ponyup-init.sh | sh -s

export PATH=$HOME/.local/share/ponyup/bin:$PATH
ponyup update ponyc nightly "--platform=$(cc -dumpmachine)"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,29 @@ jobs:
- uses: actions/checkout@v1
- name: Test with the most recent ponyc release
run: make test

alpine-bootstrap:
name: Test bootstrapping on Alpine
runs-on: ubuntu-latest
container:
image: ponylang/ponyup-ci-alpine-bootstrap-tester:20191228
steps:
- uses: actions/checkout@v1
- name: Bootstrap test
run: .ci-scripts/test-bootstrap.sh

ubuntu-bootstrap:
name: Test bootstrapping on Ubuntu
runs-on: ubuntu-latest
container:
image: ponylang/ponyup-ci-ubuntu-bootstrap-tester:20191228
steps:
- uses: actions/checkout@v1
- name: Bootstrap test
run: |
export ssl=1.1.x
.ci-scripts/test-bootstrap.sh
macos:
name: Verify PR builds on macOS with most recent ponyc release
runs-on: macos-latest
Expand Down

0 comments on commit a820564

Please sign in to comment.