diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index ae1f2b5b..f2774d46 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -12,6 +12,8 @@ on: - v*.*.* env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" SQLX_OFFLINE: "1" jobs: @@ -23,11 +25,8 @@ jobs: env: APPLE_SIGNING_IDENTITY: "Apple Distribution: defguard sp. z o.o. (82GZ7KN29J)" APPLE_SIGNING_IDENTITY_INSTALLER: "3rd Party Mac Developer Installer: defguard sp. z o.o. (82GZ7KN29J)" - APPLE_PROVIDER_SHORT_NAME: "82GZ7KN29J" - APPLE_ID: "kamil@defguard.net" - APPLE_TEAM_ID: "82GZ7KN29J" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: submodules: recursive @@ -47,6 +46,7 @@ jobs: - uses: pnpm/action-setup@v6 with: cache: true + run_install: false version: 11 - name: Install Node dependencies for New UI @@ -59,15 +59,15 @@ jobs: with: targets: aarch64-apple-darwin,x86_64-apple-darwin + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.10 + - name: Set build number run: | sed -i '' "s,@BUILD_NUMBER@,${{ github.run_number }}," swift/extension/VPNExtension.xcodeproj/project.pbxproj sed -i '' "s,@BUILD_NUMBER@,${{ github.run_number }}," src-tauri/client-cli/Info.plist sed -i '' "s,@BUILD_NUMBER@,${{ github.run_number }}," src-tauri/tauri.macos.conf.json - - name: Unlock keychain - run: security -v unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" login.keychain - - name: Build new UI run: | cd new-ui @@ -80,34 +80,17 @@ jobs: with: args: --config src-tauri/tauri.app.conf.json --target universal-apple-darwin - # - name: Bundle Defguard CLI - # env: - # BUNDLE: "target/universal-apple-darwin/release/bundle/macos/Defguard.app" - # run: | - # cd src-tauri - # mkdir -p ${BUNDLE}/Contents/Helpers/defguard-cli/Contents/MacOS - # lipo -create -output ${BUNDLE}/Contents/Helpers/defguard-cli/Contents/MacOS/defguard-cli \ - # target/aarch64-apple-darwin/release/defguard-cli \ - # target/x86_64-apple-darwin/release/defguard-cli - # ln -f client-cli/Info.plist ${BUNDLE}/Contents/Helpers/defguard-cli/Contents/Info.plist - # pushd ${BUNDLE}/Contents/Helpers/defguard-cli/Contents - # ln -f ../../../embedded.provisionprofile . - # popd - # codesign --verbose --force --options runtime \ - # --sign "${{ env.APPLE_SIGNING_IDENTITY }}" \ - # --prefix net.defguard. --entitlements Client.entitlements \ - # ${BUNDLE}/Contents/Helpers/defguard-cli - # codesign --verbose --force --options runtime \ - # --sign "${{ env.APPLE_SIGNING_IDENTITY }}" \ - # --entitlements Client.entitlements ${BUNDLE} - - name: Build installation package run: | - security -v unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" login.keychain - xcrun productbuild --sign "${{ env.APPLE_SIGNING_IDENTITY_INSTALLER }}" --component "src-tauri/target/universal-apple-darwin/release/bundle/macos/Defguard.app" /Applications defguard-client.pkg - xcrun altool --api-key ${{ secrets.APPLE_API_KEY }} --api-issuer ${{ secrets.APPLE_API_ISSUER }} --upload-app --platform macos --file defguard-client.pkg --wait - # xcrun notarytool submit --wait --apple-id ${{ env.APPLE_ID }} --password ${{ secrets.NOTARYTOOL_APP_SPECIFIC_PASSWORD }} --team-id ${{ env.APPLE_TEAM_ID }} defguard-client.pkg - # xcrun stapler staple defguard-client.pkg + security unlock-keychain -p "${{ secrets.BUILD_KEYCHAIN_PASSWORD }}" build.keychain + xcrun productbuild --keychain build.keychain \ + --sign "${{ env.APPLE_SIGNING_IDENTITY_INSTALLER }}" \ + --component "src-tauri/target/universal-apple-darwin/release/bundle/macos/Defguard.app" \ + /Applications defguard-client.pkg + xcrun notarytool submit defguard-client.pkg \ + --key ~/.private_keys/AuthKey_${{ secrets.APPLE_API_KEY }}.p8 \ + --key-id "${{ secrets.APPLE_API_KEY }}" --issuer "${{ secrets.APPLE_API_ISSUER }}" \ + --wait - name: Upload What's New env: diff --git a/.github/workflows/posture.yaml b/.github/workflows/posture.yaml index 0f096cee..52802208 100644 --- a/.github/workflows/posture.yaml +++ b/.github/workflows/posture.yaml @@ -44,10 +44,6 @@ jobs: run: | cargo test -p defguard-client-posture --locked --lib inspector::tests::ci::linux::setup1 -- --ignored - - name: Show sccache stats - run: sccache --show-stats - - test-linux-postures-encrypted: name: Linux postures - encrypted runs-on: @@ -77,10 +73,6 @@ jobs: run: | cargo test -p defguard-client-posture --locked --lib inspector::tests::ci::linux::setup2 -- --ignored - - name: Show sccache stats - run: sccache --show-stats - - test-windows-postures-setup1: name: Windows postures - setup1 runs-on: @@ -106,9 +98,6 @@ jobs: run: | cargo test -p defguard-client-posture --locked --lib inspector::tests::ci::windows::setup1 -- --ignored - - name: Show sccache stats - run: sccache --show-stats - test-windows-postures-setup2: name: Windows postures - setup2 runs-on: @@ -134,9 +123,6 @@ jobs: run: | cargo test -p defguard-client-posture --locked --lib inspector::tests::ci::windows::setup2 -- --ignored - - name: Show sccache stats - run: sccache --show-stats - test-macos-postures-unencrypted: name: macOS postures - unencrypted runs-on: @@ -159,9 +145,6 @@ jobs: run: | cargo test -p defguard-client-posture --locked --lib inspector::tests::ci::macos::setup1 -- --ignored - - name: Show sccache stats - run: sccache --show-stats - test-macos-postures-encrypted: name: macOS postures - encrypted runs-on: @@ -183,6 +166,3 @@ jobs: working-directory: src-tauri/ run: | cargo test -p defguard-client-posture --locked --lib inspector::tests::ci::macos::setup2 -- --ignored - - - name: Show sccache stats - run: sccache --show-stats diff --git a/.github/workflows/release-macos.yaml b/.github/workflows/release-macos.yaml index f2b7a6bf..ee5da912 100644 --- a/.github/workflows/release-macos.yaml +++ b/.github/workflows/release-macos.yaml @@ -8,6 +8,8 @@ on: type: string env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" SQLX_OFFLINE: "1" jobs: @@ -17,7 +19,7 @@ jobs: - macOS - native steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: submodules: recursive @@ -37,6 +39,7 @@ jobs: - uses: pnpm/action-setup@v6 with: cache: true + run_install: false version: 11 - name: Install Node dependencies for New UI @@ -49,15 +52,15 @@ jobs: with: targets: aarch64-apple-darwin,x86_64-apple-darwin + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.10 + - name: Set build number run: | sed -i '' "s,@BUILD_NUMBER@,${{ github.run_number }}," swift/extension/VPNExtension.xcodeproj/project.pbxproj sed -i '' "s,@BUILD_NUMBER@,${{ github.run_number }}," src-tauri/client-cli/Info.plist sed -i '' "s,@BUILD_NUMBER@,${{ github.run_number }}," src-tauri/tauri.macos.conf.json - - name: Unlock keychain - run: security -v unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" login.keychain - - name: Build new UI run: | cd new-ui diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 471b1f5b..090c75c0 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -914,9 +914,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" dependencies = [ "serde", ] @@ -2372,14 +2372,16 @@ dependencies = [ [[package]] name = "exr" -version = "1.74.0" +version = "1.74.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" +checksum = "6be87932f10230a4339ab394edd8e4611fcb72553d8295b4d52ea55249b3daa5" dependencies = [ "bit_field", "half", "lebe", "miniz_oxide", + "num-complex", + "pulp", "rayon-core", "smallvec", "zune-inflate", @@ -4342,6 +4344,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "bytemuck", + "num-traits", +] + [[package]] name = "num-conv" version = "0.2.2" @@ -5381,6 +5393,29 @@ dependencies = [ "pulldown-cmark", ] +[[package]] +name = "pulp" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" +dependencies = [ + "bytemuck", + "cfg-if", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", +] + +[[package]] +name = "pulp-wasm-simd-flag" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" + [[package]] name = "pxfm" version = "0.1.30" @@ -5648,6 +5683,15 @@ dependencies = [ "rgb", ] +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.13.0", +] + [[package]] name = "raw-window-handle" version = "0.6.2" @@ -5674,6 +5718,12 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "reborrow" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + [[package]] name = "redox_syscall" version = "0.5.18" @@ -9893,18 +9943,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.53" +version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75726053136156d419e285b9b7eddaaea9e3fea6ce32eed44a89901f0bd98de1" +checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.53" +version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4714fd92cf900833d49538023a9b3915155210801d1c1169eba513b2addefd71" +checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5" dependencies = [ "proc-macro2", "quote",