blob: a8f651cda4f5697cf17b3d3c1aac426d74db26ff [file] [log] [blame]
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if [ -f ".built" ]; then
echo "Test zip artifacts already built, skipping"
exit 0
fi
for i in v3.7 v3.9 v3.10 v3.11
do echo "*** $i ***"
zip -r -j - python_virtualenv | docker run -i action-python-$i -compile main >python-${i}_virtualenv.zip
cp python-${i}_virtualenv.zip python-${i}_virtualenv_invalid_main.zip
zip -d python-${i}_virtualenv_invalid_main.zip main__.py
cd python_virtualenv_invalid_venv/ ; zip ../python-${i}_virtualenv_invalid_venv.zip * ; cd ..
done
touch .built