@@ -2,6 +2,7 @@ name: Build binaries
22
33on :
44 push :
5+ branches : [ 1.4-maint ]
56 paths :
67 - ' **.py'
78 - ' **.pyx'
1415 - ' requirements.d/*'
1516 - ' scripts/**'
1617 pull_request :
18+ branches : [ 1.4-maint ]
1719 paths :
1820 - ' **.py'
1921 - ' **.pyx'
2931
3032jobs :
3133 build-binary-macos :
32- name : Build (macOS ${{ matrix.os }} / ${{ runner .arch }})
34+ name : Build (macOS ${{ matrix.os }} / ${{ matrix .arch }})
3335 strategy :
3436 fail-fast : false
3537 matrix :
36- os : [macos-12, macos-14]
38+ include :
39+ - os : macos-13
40+ arch : X64
41+ - os : macos-14
42+ arch : ARM64
3743 runs-on : ${{ matrix.os }}
3844 timeout-minutes : 60
3945
40- env :
41- # Support both Homebrew locations (Intel and Apple Silicon)
42- PKG_CONFIG_PATH : " /opt/homebrew/opt/openssl@3.0/lib/pkgconfig:/usr/local/opt/openssl@3.0/lib/pkgconfig:$PKG_CONFIG_PATH"
43-
4446 steps :
4547 - name : Checkout
4648 uses : actions/checkout@v4
@@ -63,57 +65,49 @@ jobs:
6365 ${{ runner.os }}-
6466
6567 - name : Install macOS packages via Homebrew (see Brewfile)
66- run : |
67- brew bundle install
68+ run : brew bundle install
6869
6970 - name : Install Python requirements
7071 run : |
7172 python -m pip install --upgrade pip setuptools wheel
7273 pip install -r requirements.d/development.txt
7374
7475 - name : Build Borg to compile extensions
75- env :
76- # Set both paths again to be sure nothing overrides them
77- PKG_CONFIG_PATH : " /opt/homebrew/opt/openssl@3.0/lib/pkgconfig:/usr/local/opt/openssl@3.0/lib/pkgconfig:${{ env.PKG_CONFIG_PATH }}"
78- run : |
79- pip install -ve .
76+ run : pip install -ve .
8077
81- - name : Build PyInstaller single-file binary
78+ - name : Build Borg fat binaries using PyInstaller
8279 run : |
8380 python -m pip install 'pyinstaller==6.7.0'
8481 mkdir -p dist/binary
8582 pyinstaller --clean --distpath=dist/binary scripts/borg.exe.spec
86- pushd dist/binary
87- tar -czvf borg.tgz borg-dir
88- rm -rf borg-dir
89- popd
9083
9184 - name : Smoke-test the built binary (borg -V)
9285 run : |
9386 pushd dist/binary
94- ls -l
95- # test single-file binary
87+ echo "single-file binary"
9688 chmod +x borg.exe
9789 ./borg.exe -V
98- # test single-dir binary
99- tar -xzvf borg.tgz
90+ echo "single-directory binary"
10091 chmod +x borg-dir/borg.exe
10192 ./borg-dir/borg.exe -V
93+ tar czf borg.tgz borg-dir
10294 popd
10395
10496 - name : Prepare artifacts
10597 run : |
10698 mkdir -p artifacts
10799 if [ -f dist/binary/borg.exe ]; then
108- cp dist/binary/borg.exe artifacts/borg-${{ matrix.os }}-${{ runner .arch }}
100+ cp dist/binary/borg.exe artifacts/borg-${{ matrix.os }}-${{ matrix .arch }}.exe
109101 fi
110102 if [ -f dist/binary/borg.tgz ]; then
111- cp dist/binary/borg.tgz artifacts/borg-dir- ${{ matrix.os }}-${{ runner .arch }}.tgz
103+ cp dist/binary/borg.tgz artifacts/borg-${{ matrix.os }}-${{ matrix .arch }}.tgz
112104 fi
105+ echo "artifact files"
106+ ls -l artifacts/
113107
114108 - name : Upload artifacts
115109 uses : actions/upload-artifact@v4
116110 with :
117- name : borg-macos- ${{ matrix.os }}-${{ runner .arch }}
111+ name : borg-${{ matrix.os }}-${{ matrix .arch }}
118112 path : artifacts/*
119113 if-no-files-found : error
0 commit comments