Skip to content

Commit

Permalink
Workflow file changes.
Browse files Browse the repository at this point in the history
Signed-off-by: Govind Kamat <govkamat@amazon.com>
  • Loading branch information
gkamat committed Aug 29, 2024
1 parent 199dcf9 commit 0c10e3b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ function setup {
function build {
setup

make pyinst
make install
make precommit
set -e
make install-devel
make lint
make test
}

Expand All @@ -32,7 +32,7 @@ function build_it {

docker pull ubuntu/squid:latest

# make it38, it39, etc.
# make it38, it39, etc. so they run as concurrent GHA jobs
make "it${1//./}"
}

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Actions
name: Run Unit Tests
on: [workflow_dispatch, pull_request]
jobs:
Unit-Tests:
Expand All @@ -8,11 +8,14 @@ jobs:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}

steps:
- name: Check out repository code
uses: actions/checkout@v2

- name: Clone pyenv
run: git clone https://github.com/pyenv/pyenv.git ~/.pyenv

- name: Run the CI build script
run: bash .ci/build.sh build
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ jobs:

- name: Docker Build ${{ matrix.platform }}
run: |
set -x
docker buildx version
tag=osb/osb-`echo ${{ matrix.platform }} | tr '/' '-'`
set -x
docker buildx build --platform ${{ matrix.platform }} --build-arg VERSION=`cat version.txt` --build-arg BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` -f docker/Dockerfile -t "$tag" -o type=docker .
set +x
docker images | grep "$tag"
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@
SHELL = /bin/bash
PIP = pip3
VERSIONS = $(shell jq -r '.python_versions | .[]' .ci/variables.json | sed '$$d')
VERSION38 = $(shell jq -r '.python_versions | .[]' .ci/variables.json | sed '$$d' | grep 3\.8)
PYENV_ERROR = "\033[0;31mIMPORTANT\033[0m: Please install pyenv.\n"

pyinst:
@which pyenv > /dev/null || { printf $(PYENV_ERROR); exit 1; }
@for i in $(VERSIONS); do pyenv install --skip-existing $$i; done
pyenv local $(VERSIONS)

pyinst38:
@which pyenv > /dev/null || { printf $(PYENV_ERROR); exit 1; }
pyenv install --skip-existing $(VERSION38)
pyenv local $(VERSION38)

check-java:
@if ! test "$(JAVA_HOME)" || ! java --version > /dev/null 2>&1 || ! javadoc --help > /dev/null 2>&1; then \
echo "Java installation issues for running integration tests" >&2; \
Expand All @@ -40,7 +46,7 @@ install-deps:
install-user: install-deps
PIP_ONLY_BINARY=h5py $(PIP) install -e .

install-devel: install-deps
install-devel: pyinst38 install-deps
PIP_ONLY_BINARY=h5py $(PIP) install -e .[develop]

wheel:
Expand Down Expand Up @@ -71,9 +77,7 @@ lint:
test:
pytest tests/

precommit: lint

it: check-java python-caches-clean tox-env-clean
it: pyinst check-java python-caches-clean tox-env-clean
@which tox || $(PIP) install tox
tox

Expand Down

0 comments on commit 0c10e3b

Please sign in to comment.