Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions .github/workflows/currency-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,16 @@ jobs:
continue-on-error: true
env:
GHA_CURRENCY_SERVICE_ID_API_KEY: ${{ secrets.GHA_CURRENCY_SERVICE_ID_API_KEY }}
GHA_CURRENCY_SERVICE_ID: ${{ secrets.GHA_CURRENCY_SERVICE_ID }}
PYTHON_VERSION: "3.9"
PACKAGE_NAME: ${{ inputs.package_name }}
VERSION: ${{ inputs.version }}

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # required for getting all the commits not just the latest commits

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -262,8 +265,9 @@ jobs:
if ls *.whl 1> /dev/null 2>&1; then
sudo chmod a+r *.whl
WHEEL_FILE=$(ls *.whl)
SHA256_VALUE=$(cat sha256.sha)
chmod +x ./gha-script/upload-scripts/upload_wheel.sh
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE $SHA256_VALUE
else
echo "No wheel file found!"
exit 1
Expand All @@ -275,13 +279,16 @@ jobs:
runs-on: ${{ inputs.large-runner-label != '' && inputs.large-runner-label || 'ubuntu-24.04-ppc64le-p10' }}
env:
GHA_CURRENCY_SERVICE_ID_API_KEY: ${{ secrets.GHA_CURRENCY_SERVICE_ID_API_KEY }}
GHA_CURRENCY_SERVICE_ID: ${{ secrets.GHA_CURRENCY_SERVICE_ID }}
PYTHON_VERSION: "3.10"
PACKAGE_NAME: ${{ inputs.package_name }}
VERSION: ${{ inputs.version }}

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # required for getting all the commits not just the latest commits

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -331,8 +338,9 @@ jobs:
if ls *.whl 1> /dev/null 2>&1; then
sudo chmod a+r *.whl
WHEEL_FILE=$(ls *.whl)
SHA256_VALUE=$(cat sha256.sha)
chmod +x ./gha-script/upload-scripts/upload_wheel.sh
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE $SHA256_VALUE
else
echo "No wheel file found!"
exit 1
Expand All @@ -344,13 +352,16 @@ jobs:
runs-on: ${{ inputs.large-runner-label != '' && inputs.large-runner-label || 'ubuntu-24.04-ppc64le-p10' }}
env:
GHA_CURRENCY_SERVICE_ID_API_KEY: ${{ secrets.GHA_CURRENCY_SERVICE_ID_API_KEY }}
GHA_CURRENCY_SERVICE_ID: ${{ secrets.GHA_CURRENCY_SERVICE_ID }}
PYTHON_VERSION: "3.11"
PACKAGE_NAME: ${{ inputs.package_name }}
VERSION: ${{ inputs.version }}

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # required for getting all the commits not just the latest commits

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -418,8 +429,9 @@ jobs:
if ls *.whl 1> /dev/null 2>&1; then
sudo chmod a+r *.whl
WHEEL_FILE=$(ls *.whl)
SHA256_VALUE=$(cat sha256.sha)
chmod +x ./gha-script/upload-scripts/upload_wheel.sh
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE $SHA256_VALUE
else
echo "No wheel file found!"
exit 1
Expand All @@ -431,13 +443,16 @@ jobs:
runs-on: ${{ inputs.large-runner-label != '' && inputs.large-runner-label || 'ubuntu-24.04-ppc64le-p10' }}
env:
GHA_CURRENCY_SERVICE_ID_API_KEY: ${{ secrets.GHA_CURRENCY_SERVICE_ID_API_KEY }}
GHA_CURRENCY_SERVICE_ID: ${{ secrets.GHA_CURRENCY_SERVICE_ID }}
PYTHON_VERSION: "3.12"
PACKAGE_NAME: ${{ inputs.package_name }}
VERSION: ${{ inputs.version }}

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # required for getting all the commits not just the latest commits

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -505,8 +520,9 @@ jobs:
if ls *.whl 1> /dev/null 2>&1; then
sudo chmod a+r *.whl
WHEEL_FILE=$(ls *.whl)
SHA256_VALUE=$(cat sha256.sha)
chmod +x ./gha-script/upload-scripts/upload_wheel.sh
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE $SHA256_VALUE
else
echo "No wheel file found!"
exit 1
Expand All @@ -519,13 +535,16 @@ jobs:
continue-on-error: true
env:
GHA_CURRENCY_SERVICE_ID_API_KEY: ${{ secrets.GHA_CURRENCY_SERVICE_ID_API_KEY }}
GHA_CURRENCY_SERVICE_ID: ${{ secrets.GHA_CURRENCY_SERVICE_ID }}
PYTHON_VERSION: "3.13"
PACKAGE_NAME: ${{ inputs.package_name }}
VERSION: ${{ inputs.version }}

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # required for getting all the commits not just the latest commits

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -593,8 +612,9 @@ jobs:
if ls *.whl 1> /dev/null 2>&1; then
sudo chmod a+r *.whl
WHEEL_FILE=$(ls *.whl)
SHA256_VALUE=$(cat sha256.sha)
chmod +x ./gha-script/upload-scripts/upload_wheel.sh
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE
bash ./gha-script/upload-scripts/upload_wheel.sh $WHEEL_FILE $SHA256_VALUE
else
echo "No wheel file found!"
exit 1
Expand Down
12 changes: 8 additions & 4 deletions gha-script/build_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import docker
import json

def trigger_build_wheel(wrapper_file, python_version, image_name, file_name, version):
def trigger_build_wheel(wrapper_file, python_version, image_name, file_name, version, post_process_file):
# Docker client setup
client = docker.DockerClient(base_url='unix://var/run/docker.sock')

Expand All @@ -28,7 +28,7 @@ def trigger_build_wheel(wrapper_file, python_version, image_name, file_name, ver
command = [
"bash",
"-c",
f"cd /home/tester/ && ./{wrapper_file} {python_version} {file_name} {version}"
f"cd /home/tester/ && ./{wrapper_file} {python_version} {file_name} {version} {post_process_file}"
]

# Run container
Expand All @@ -39,7 +39,11 @@ def trigger_build_wheel(wrapper_file, python_version, image_name, file_name, ver
detach=True,
volumes={current_dir: {'bind': '/home/tester/', 'mode': 'rw'}}, # Mount current directory with both files
stderr=True,
stdout=True
stdout=True,
environment={
"GHA_CURRENCY_SERVICE_ID_API_KEY": os.getenv("GHA_CURRENCY_SERVICE_ID_API_KEY"),
"GHA_CURRENCY_SERVICE_ID": os.getenv("GHA_CURRENCY_SERVICE_ID"),
}
)

# STREAM logs in real-time
Expand Down Expand Up @@ -69,4 +73,4 @@ def trigger_build_wheel(wrapper_file, python_version, image_name, file_name, ver

if __name__=="__main__":
print("Inside python program")
trigger_build_wheel(sys.argv[1],sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
trigger_build_wheel(sys.argv[1],sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5],sys.argv[6])
6 changes: 5 additions & 1 deletion gha-script/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ else
fi

WHEEL_SCRIPT=gha-script/create_wheel_wrapper.sh

# path to post_process_wheel script (suffix addition, license addition, metadata addition)
POST_PROCESS_SCRIPT_PATH=gha-script/post_process_wheel.py

#python3 gha-script/build_wheels.py "$WHEEL_SCRIPT" "$PYTHON_VERSION" "$docker_image" "$PKG_DIR_PATH$BUILD_SCRIPT" "$VERSION" > build_log &

# SCRIPT_PID=$!
Expand All @@ -47,7 +51,7 @@ WHEEL_SCRIPT=gha-script/create_wheel_wrapper.sh
# sleep 100
# done
# wait $SCRIPT_PID
python3 gha-script/build_wheels.py "$WHEEL_SCRIPT" "$PYTHON_VERSION" "$docker_image" "$PKG_DIR_PATH$BUILD_SCRIPT" "$VERSION" 2>&1 | tee wheel_build_log
python3 gha-script/build_wheels.py "$WHEEL_SCRIPT" "$PYTHON_VERSION" "$docker_image" "$PKG_DIR_PATH$BUILD_SCRIPT" "$VERSION" "$POST_PROCESS_SCRIPT_PATH" 2>&1 | tee wheel_build_log
wheel_status=${PIPESTATUS[0]}

log_size=$(stat -c %s wheel_build_log)
Expand Down
Loading
Loading