Skip to content

Commit

Permalink
[manylinux1] Build on GHA (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut authored Feb 6, 2021
1 parent 153e846 commit 1717bca
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 45 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build

on:
push:
branches-ignore:
- "dependabot/**"
paths:
- ".github/workflows/build.yml"
- "docker/**"
- "*.sh"
pull_request:
paths:
- ".github/workflows/build.yml"
- "docker/**"
- "build.sh"

jobs:
build:
name: manylinux1_${{ matrix.platform }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- platform: "i686"
- platform: "x86_64"

env:
PLATFORM: ${{ matrix.platform }}
COMMIT_SHA: ${{ github.sha }}

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: ./build.sh
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/manylinux1' && github.repository == 'pypa/manylinux'
run: ./deploy.sh
env:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
set -ex

docker/build_scripts/prefetch.sh perl openssl curl
docker build --rm -t quay.io/pypa/manylinux1_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/
docker build --rm -t quay.io/pypa/manylinux1_${PLATFORM}:${COMMIT_SHA} -f docker/Dockerfile-${PLATFORM} docker/
9 changes: 9 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
tag="quay.io/pypa/manylinux1_$PLATFORM"
build_id=$(git show -s --format=%cd-%h --date=short ${COMMIT_SHA})

docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
docker tag ${tag}:${COMMIT_SHA} ${tag}:${build_id}
docker tag ${tag}:${COMMIT_SHA} ${tag}:latest
docker push ${tag}:${build_id}
docker push ${tag}:latest
9 changes: 0 additions & 9 deletions docker/deploy.sh

This file was deleted.

0 comments on commit 1717bca

Please sign in to comment.