Skip to content

Commit

Permalink
fix CI?
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Oct 12, 2024
1 parent e98ef74 commit ec2cd10
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ jobs:
- name: Setup venv
run: |
python3 -m venv .venv
. .venv/bin/activate
- name: Install build module
run: python3 -m pip install -U build
run: |
. .venv/bin/activate
python3 -m pip install -U build
- name: Build wheel and source
run: python -m build --sdist --wheel --outdir dist/ .
run: |
. .venv/bin/activate
python3 -m build --sdist --wheel --outdir dist/ .
- uses: actions/[email protected]
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ jobs:
- name: Setup venv
run: |
python3 -m venv .venv
. .venv/bin/activate
- name: Install Dependencies
run: |
. .venv/bin/activate
python3 -m pip install -U -r requirements.txt
python3 -m pip install -U mypy
- name: mypy
run: mypy --show-column-numbers --hide-error-context .
run: |
. .venv/bin/activate
mypy --show-column-numbers --hide-error-context .
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.7
python_version = 3.9
check_untyped_defs = True
disallow_untyped_defs = True
disallow_any_unimported = True
Expand Down
8 changes: 5 additions & 3 deletions spimdisasm/common/GlobalConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ def processEnvironmentVariables(self) -> None:
environmentValue = bool(environmentValue)
elif isinstance(currentValue, Compiler):
newComp = Compiler.fromStr(environmentValue)
if newComp == Compiler.UNKNOWN:
Utils.eprint(f"Unrecognized compiler setting from environment 'SPIMDISASM_{attr.upper()}={environmentValue}'. Choosing compiler UNKNOWN instead.")
if newComp is None:
Utils.eprint(f"Unrecognized compiler setting from environment 'SPIMDISASM_{attr.upper()}={environmentValue}'.")
continue
environmentValue = newComp
elif isinstance(currentValue, InputEndian):
Expand Down Expand Up @@ -530,7 +530,9 @@ def parseArgs(self, args: argparse.Namespace) -> None:
self.CUSTOM_SUFFIX = args.custom_suffix

if args.compiler is not None:
self.COMPILER = Compiler.fromStr(args.compiler)
compiler = Compiler.fromStr(args.compiler)
if compiler is not None:
self.COMPILER = compiler

if args.symbol_alignment_requires_aligned_section is not None:
self.SYMBOL_ALIGNMENT_REQUIRES_ALIGNED_SECTION = args.symbol_alignment_requires_aligned_section
Expand Down

0 comments on commit ec2cd10

Please sign in to comment.