Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug macos failure #244

Merged
merged 5 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ on:
jobs:
build-and-test-python:
name: Test Python code
runs-on: ${{ matrix.os-artifact[0] }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os-artifact: [ [ubuntu-latest, linux], [windows-latest, windows], [macos-latest, macos] ]
python-version: [ 3.6, 3.7, 3.8, 3.9 ] # '3.10' has issues for now
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ 3.6, 3.8, 3.9 ] # '3.10' has issues for now
steps:
- uses: actions/checkout@v2
- name: Download workflow artifact
Expand All @@ -45,7 +45,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v2
with:
name: Python ${{ matrix.python-version }} Unit Test Results (${{ matrix.os-artifact[0] }})
name: Python ${{ matrix.python-version }} Unit Test Results (${{ matrix.os }})
path: 'python/test_output*.xml'

publish-test-results-python:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.14.0
with:
workflow: "build-libs.yml"
path: ./libs
branch: main
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
Expand Down
5 changes: 3 additions & 2 deletions devops/build_sdks.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ def build_dotnet(args) -> None:


def get_package_versions(args) -> str:
return (args.package_version if args.package_version else get_github_version(args.github_token)).lstrip('v')
return (args.package_version if args.package_version else get_github_version()).lstrip('v')


def get_github_version(github_token: str = None) -> str:
if not github_token:
github_token = os.getenv('API_GITHUB_TOKEN')
github_release_request = requests.get('https://api.github.com/repos/trinsic-id/okapi/releases/latest',
headers={'Authorization': github_token})
github_json = github_release_request.json()
Expand All @@ -111,7 +113,6 @@ def get_github_version(github_token: str = None) -> str:
def parse_arguments():
parser = argparse.ArgumentParser(description='Process SDK building')
parser.add_argument('--package-version', help='Manual override package version')
parser.add_argument('--github-token', help='github token', default='')
parser.add_argument('--run-tests', help='Run unit tests', action='store_true')
parser.add_argument('--make-package', help='Make the packages', action='store_true')
# TODO - allow specifying what to build?
Expand Down
5 changes: 2 additions & 3 deletions python/okapi/okapi_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,15 @@ def download_binaries(force_download=True):
latest_release = requests.get('https://api.github.com/repos/trinsic-id/okapi/releases/latest',
headers={'Authorization': github_token}).json()
try:
latest_assets = requests.get(latest_release['assets_url']).json()
latest_assets = requests.get(latest_release['assets_url'], headers={'Authorization': github_token}).json()
libs_asset = [asset for asset in latest_assets if asset['name'] == 'libs.zip'][0]
# Download zip
zip_download = requests.get(libs_asset['browser_download_url'], stream=True)
zip_download = requests.get(libs_asset['browser_download_url'], headers={'Authorization': github_token}, stream=True)
z = zipfile.ZipFile(io.BytesIO(zip_download.content))
z.extractall(extract_dir)
shutil.copy2(copy_from, extract_dir)
cleanup_zip_download(extract_dir)
except:
print(latest_release)
raise


Expand Down