|
11 | 11 | workflow_dispatch: |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - build: |
| 14 | + build-x64: |
15 | 15 | strategy: |
| 16 | + fail-fast: false |
16 | 17 | matrix: |
17 | 18 | os: [ubuntu-latest, macos-latest, windows-latest] |
18 | | - arch: [x64, arm64] |
19 | 19 | runs-on: ${{ matrix.os }} |
20 | | - name: Build on ${{ matrix.os }} (${{ matrix.arch }}) |
| 20 | + name: Build on ${{ matrix.os }} |
21 | 21 | steps: |
22 | 22 | - name: Checkout code |
23 | 23 | uses: actions/checkout@v4 |
24 | 24 | - name: Set up Python |
25 | 25 | uses: actions/setup-python@v5 |
26 | 26 | with: |
27 | | - python-version: '3.11' |
28 | | - architecture: ${{ matrix.arch }} |
| 27 | + python-version: '3.13' |
| 28 | + architecture: 'x64' |
29 | 29 | - name: Setup virtual env |
30 | 30 | run: | |
31 | 31 | python -m venv ./venv |
32 | | - - name: Install dependencies |
| 32 | + - name: Build exe for POSIX |
| 33 | + if: runner.os != 'Windows' |
33 | 34 | run: | |
34 | 35 | ./venv/bin/python -m pip install --upgrade pip |
35 | 36 | ./venv/bin/python -m pip install -r requirements_dev.txt |
36 | 37 | ./venv/bin/python -m pip install . |
37 | 38 | ./venv/bin/python -m pip install pyinstaller |
| 39 | + fidodir=$(./venv/bin/python -c "import fido2;from os import path as op;print(op.dirname(fido2.__file__))") |
| 40 | + omddir=$(./venv/bin/python -c "import orderedmultidict;from os import path as op;print(op.dirname(orderedmultidict.__file__))") |
| 41 | + ./venv/bin/python -m PyInstaller -F --hidden-import=gimme_aws_creds --add-data "$fidodir/public_suffix_list.dat:fido2" --add-data "$omddir/__version__.py:orderedmultidict" bin/gimme-aws-creds |
| 42 | + - name: Upload POSIX executable |
| 43 | + if: runner.os != 'Windows' |
| 44 | + uses: actions/upload-artifact@v4 |
| 45 | + with: |
| 46 | + name: gimme-aws-creds-${{ matrix.os }}-x64 |
| 47 | + path: dist/gimme-aws-creds |
| 48 | + - name: Build exe for Windows |
| 49 | + if: runner.os == 'Windows' |
| 50 | + shell: pwsh |
| 51 | + run: | |
| 52 | + ./venv/Scripts/python -m pip install --upgrade pip |
| 53 | + ./venv/Scripts/python -m pip install -r requirements_dev.txt |
| 54 | + ./venv/Scripts/python -m pip install . |
| 55 | + ./venv/Scripts/python -m pip install pyinstaller |
| 56 | + $fidodir = ./venv/Scripts/python -c "import fido2;from os import path as op;print(op.dirname(fido2.__file__))" |
| 57 | + $omddir = ./venv/Scripts/python -c "import orderedmultidict;from os import path as op;print(op.dirname(orderedmultidict.__file__))" |
| 58 | + ./venv/Scripts/python -m PyInstaller -F --hidden-import=gimme_aws_creds --add-data "$fidodir/public_suffix_list.dat;fido2" --add-data "$omddir/__version__.py;orderedmultidict" bin/gimme-aws-creds |
| 59 | + - name: Upload Windows executable |
| 60 | + if: runner.os == 'Windows' |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: gimme-aws-creds-windows-x64 |
| 64 | + path: dist/gimme-aws-creds.exe |
| 65 | + |
| 66 | + build-arm: |
| 67 | + strategy: |
| 68 | + fail-fast: false |
| 69 | + matrix: |
| 70 | + os: [ubuntu-24.04-arm, macos-latest, windows-11-arm] |
| 71 | + runs-on: ${{ matrix.os }} |
| 72 | + name: Build on ${{ matrix.os }} |
| 73 | + steps: |
| 74 | + - name: Checkout code |
| 75 | + uses: actions/checkout@v4 |
| 76 | + - name: Set up Python |
| 77 | + uses: actions/setup-python@v5 |
| 78 | + with: |
| 79 | + python-version: '3.13' |
| 80 | + architecture: 'arm64' |
| 81 | + - name: Setup virtual env |
| 82 | + run: | |
| 83 | + python -m venv ./venv |
38 | 84 | - name: Build exe for POSIX |
39 | 85 | if: runner.os != 'Windows' |
40 | 86 | run: | |
| 87 | + ./venv/bin/python -m pip install --upgrade pip |
| 88 | + ./venv/bin/python -m pip install -r requirements_dev.txt |
| 89 | + ./venv/bin/python -m pip install . |
| 90 | + ./venv/bin/python -m pip install pyinstaller |
41 | 91 | fidodir=$(./venv/bin/python -c "import fido2;from os import path as op;print(op.dirname(fido2.__file__))") |
42 | 92 | omddir=$(./venv/bin/python -c "import orderedmultidict;from os import path as op;print(op.dirname(orderedmultidict.__file__))") |
43 | 93 | ./venv/bin/python -m PyInstaller -F --hidden-import=gimme_aws_creds --add-data "$fidodir/public_suffix_list.dat:fido2" --add-data "$omddir/__version__.py:orderedmultidict" bin/gimme-aws-creds |
44 | 94 | - name: Upload POSIX executable |
45 | 95 | if: runner.os != 'Windows' |
46 | 96 | uses: actions/upload-artifact@v4 |
47 | 97 | with: |
48 | | - name: gimme-aws-creds-${{ matrix.os }}-${{ matrix.arch }} |
| 98 | + name: gimme-aws-creds-${{ matrix.os }}-arm64 |
49 | 99 | path: dist/gimme-aws-creds |
50 | 100 | - name: Build exe for Windows |
51 | 101 | if: runner.os == 'Windows' |
| 102 | + shell: pwsh |
| 103 | + env: |
| 104 | + VCPKG_ROOT: 'C:\vcpkg' |
| 105 | + OPENSSL_DIR: 'C:\vcpkg\installed\arm64-windows-static' |
52 | 106 | run: | |
| 107 | + vcpkg install openssl:arm64-windows-static |
| 108 | + vcpkg integrate install |
| 109 | + ./venv/Scripts/python -m pip install --upgrade pip |
| 110 | + ./venv/Scripts/python -m pip install --only-binary=:all: -r requirements_dev.txt |
| 111 | + ./venv/Scripts/python -m pip install . |
| 112 | + ./venv/Scripts/python -m pip install pyinstaller |
53 | 113 | $fidodir = ./venv/Scripts/python -c "import fido2;from os import path as op;print(op.dirname(fido2.__file__))" |
54 | 114 | $omddir = ./venv/Scripts/python -c "import orderedmultidict;from os import path as op;print(op.dirname(orderedmultidict.__file__))" |
55 | 115 | ./venv/Scripts/python -m PyInstaller -F --hidden-import=gimme_aws_creds --add-data "$fidodir/public_suffix_list.dat;fido2" --add-data "$omddir/__version__.py;orderedmultidict" bin/gimme-aws-creds |
56 | 116 | - name: Upload Windows executable |
57 | 117 | if: runner.os == 'Windows' |
58 | 118 | uses: actions/upload-artifact@v4 |
59 | 119 | with: |
60 | | - name: gimme-aws-creds-windows-${{ matrix.arch }} |
| 120 | + name: gimme-aws-creds-windows-arm64 |
61 | 121 | path: dist/gimme-aws-creds.exe |
62 | | - |
|
0 commit comments