Skip to content

Commit

Permalink
remove Linux i386, use i686 on Windows only
Browse files Browse the repository at this point in the history
  • Loading branch information
yeisonvargasf committed Jan 18, 2024
1 parent 1c8fd20 commit d156278
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 44 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,15 @@ jobs:
- uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'windows-latest' }}
with:
name: safety-win-i386.exe
path: dist/safety-win-i386.exe
name: safety-win-i686.exe
path: dist/safety-win-i686.exe
if-no-files-found: error
- uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'windows-latest' }}
with:
name: safety-win-x86_64.exe
path: dist/safety-win-x86_64.exe
if-no-files-found: error
- uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-20.04' }}
with:
name: safety-linux-i386
path: dist/safety-linux-i386
if-no-files-found: error
- uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-20.04' }}
with:
Expand Down
24 changes: 0 additions & 24 deletions Dockerfilei386

This file was deleted.

13 changes: 1 addition & 12 deletions binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ def python(self):
# up the current working directory.
LINUX: OrderedDict([
(64, "python3"),
(32,
f"docker run --platform linux/386 -t "
f"-v {os.getcwd()}:/app 32-bit-linux "
f"python3"),
]),

MACOS: {
Expand Down Expand Up @@ -76,13 +72,6 @@ def install(self):
"""
Install required dependencies
"""
# special case:
# - build the 32 bit binary for linux on docker
# - create dist/ path to circumvent permission errors
if self.os == self.LINUX:
self.run("docker build --platform linux/386 "
"-t 32-bit-linux -f Dockerfilei386 .")

for arch, python in self.python:
self.run(f"{python} -m pip install pyinstaller")
self.run(f"{python} -m pip install -r test_requirements.txt")
Expand All @@ -105,7 +94,7 @@ def dist(self):
artifact_path = os.path.join(
os.getcwd(),
"dist",
f"safety-{self.os}-{'i386' if arch == 32 else 'x86_64'}"
f"safety-{self.os}-{'i686' if arch == 32 else 'x86_64'}"
)
binary_path = os.path.join(os.getcwd(), build_path, "safety")
if self.os == self.WIN:
Expand Down

0 comments on commit d156278

Please sign in to comment.