Skip to content

Commit

Permalink
... more grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Oct 10, 2024
1 parent 79c473e commit d82644f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ jobs:
uses: actions/checkout@v4

- name: Compile images
run: bash -x ./test.sh ${{ matrix.test_platform }}
run: bash ./test.sh ${{ matrix.test_platform }}

- name: Push images
run: |
[ -n "$ACTIONS_RUNNER_DEBUG" ] && set -x
if ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} && ${{ github.ref == 'refs/heads/master' }}; then
docker login -u maxgimeno -p ${{ secrets.PASSWD }}
bash -x ./push.sh ${{ matrix.test_platform }}
bash ./push.sh ${{ matrix.test_platform }}
else
echo "Don't upload on pull_requests"
fi
10 changes: 7 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@ set -e

[ -n "$ACTIONS_RUNNER_DEBUG" ] && set -x

curl -o cgal.tar.gz -L $(curl -s https://api.github.com/repos/CGAL/cgal/releases/latest | jq -r .tarball_url)
CGAL_TARBALL=$(curl -s https://api.github.com/repos/CGAL/cgal/releases/latest | jq -r .tarball_url)
echo "::group::Download and extract CGAL tarball from $CGAL_TARBALL"
curl -o cgal.tar.gz -L "$CGAL_TARBALL"
mkdir -p cgal
tar -xzf cgal.tar.gz -C cgal --strip-components=1

if command -v selinuxenabled >/dev/null && selinuxenabled; then
chcon -Rt container_file_t cgal
fi
echo '::endgroup::'

echo "::group::Install docker-py"
if command -v python3 >/dev/null; then
python3 -m pip install docker
fi
echo '::endgroup::'

if [ -n "$GITHUB_SHA" ]; then
COMMIT_URL=https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_SHA}
fi

function dockerbuild() {
if [ -z "$GITHUB_SHA" ]; then
if [ -z "$COMMIT_URL" ]; then
docker build -t cgal/testsuite-docker:$1 ./$2
else
docker build --build-arg dockerfile_url=${COMMIT_URL}/$2/Dockerfile -t cgal/testsuite-docker:$1 ./$2
Expand Down

0 comments on commit d82644f

Please sign in to comment.