mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 15:38:23 +00:00
ci: build the app test cores with the tool
This commit is contained in:
1 parent
625369258e
commit
238fe03a91
6 files changed
+63
-24
No files matched your search
@@ -32,7 +32,6 @@ env:
|
||||
GHC_VER: 9.6.3
|
||||
CABAL_VER: 3.10.2.0
|
||||
JAVA_VER: 17
|
||||
CORE_PKG: android-core-arm64-v8a.tar.gz
|
||||
BACKEND_PKG: desktop-linux-backend.tar.gz
|
||||
APK: android-foss-arm64-v8a-debug.apk
|
||||
|
||||
@@ -92,7 +91,7 @@ jobs:
|
||||
- name: Artifact names
|
||||
id: names
|
||||
run: |
|
||||
echo "core=android-core-${{ hashFiles('src/**', 'cabal.project', 'simplex-chat.cabal', 'PRIVACY.md', 'flake.nix', 'flake.lock', 'scripts/nix/**', 'scripts/ci/android/build-core.sh') }}" >> "$GITHUB_OUTPUT"
|
||||
echo "core=android-core-${{ hashFiles('src/**', 'cabal.project', 'simplex-chat.cabal', 'PRIVACY.md', 'flake.nix', 'flake.lock', 'scripts/nix/**', 'scripts/simplex-chat-build.py', 'scripts/simplex_build/**', '!scripts/simplex_build/test_*.py', '!scripts/simplex_build/testing.py') }}" >> "$GITHUB_OUTPUT"
|
||||
echo "backend=desktop-linux-backend-${{ hashFiles('src/**', 'apps/simplex-chat/**', 'apps/simplex-directory-service/Main.hs', 'apps/simplex-directory-service/src/**', 'cabal.project', 'simplex-chat.cabal', 'scripts/ci/desktop-linux/build-backend.sh') }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Find core library
|
||||
@@ -168,14 +167,18 @@ jobs:
|
||||
free -h
|
||||
df -h /
|
||||
|
||||
# the Nix sandbox needs user namespaces, which Ubuntu 24.04 restricts
|
||||
- name: Allow user namespaces
|
||||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
|
||||
- name: Build core library
|
||||
run: scripts/ci/android/build-core.sh ~/core/${{ env.CORE_PKG }}
|
||||
run: scripts/simplex-chat-build.py build libs android --install-nix --out ~/core
|
||||
|
||||
- name: Upload core library
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ needs.plan.outputs.core }}
|
||||
path: ~/core/${{ env.CORE_PKG }}
|
||||
path: ~/core
|
||||
compression-level: 0
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
@@ -200,8 +203,11 @@ jobs:
|
||||
free -h
|
||||
df -h /
|
||||
|
||||
- name: Allow user namespaces
|
||||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
|
||||
- name: Build core library
|
||||
run: scripts/ci/android/build-core.sh ~/core/android-core-armeabi-v7a.tar.gz armv7a
|
||||
run: scripts/simplex-chat-build.py build libs android --arch armv7a --install-nix --out ~/core
|
||||
|
||||
app:
|
||||
name: Android app in the emulator
|
||||
@@ -242,7 +248,7 @@ jobs:
|
||||
|
||||
- name: Install core library
|
||||
id: core
|
||||
run: scripts/ci/android/install-core.sh ~/core/${{ env.CORE_PKG }}
|
||||
run: scripts/simplex-chat-build.py install libs android ~/core
|
||||
|
||||
- name: Download backend
|
||||
if: needs.plan.outputs.run-backend == 'true'
|
||||
|
||||
@@ -28,7 +28,7 @@ env:
|
||||
GHC_VER: 9.6.3
|
||||
CABAL_VER: 3.10.2.0
|
||||
JAVA_VER: 17
|
||||
CORE_PKG: desktop-core-linux-x86_64.tar.gz
|
||||
CORE_PKG: simplex-chat-libs-linux-x86_64.zip
|
||||
BACKEND_PKG: desktop-linux-backend.tar.gz
|
||||
|
||||
jobs:
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
- name: Artifact names
|
||||
id: names
|
||||
run: |
|
||||
echo "core=desktop-linux-core-${{ hashFiles('src/**', 'cabal.project', 'simplex-chat.cabal', 'PRIVACY.md', 'scripts/desktop/build-lib-linux.sh', 'scripts/ci/desktop-linux/build-core.sh') }}" >> "$GITHUB_OUTPUT"
|
||||
echo "core=desktop-linux-core-${{ hashFiles('src/**', 'cabal.project', 'simplex-chat.cabal', 'PRIVACY.md', 'scripts/simplex-chat-build.py', 'scripts/simplex_build/**', '!scripts/simplex_build/test_*.py', '!scripts/simplex_build/testing.py') }}" >> "$GITHUB_OUTPUT"
|
||||
echo "backend=desktop-linux-backend-${{ hashFiles('src/**', 'apps/simplex-chat/**', 'apps/simplex-directory-service/Main.hs', 'apps/simplex-directory-service/src/**', 'cabal.project', 'simplex-chat.cabal', 'scripts/ci/desktop-linux/build-backend.sh') }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Find core library
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
sudo apt-get install -y libffi-dev libgmp-dev libnuma-dev libssl-dev zlib1g-dev patchelf
|
||||
|
||||
- name: Build core library
|
||||
run: scripts/ci/desktop-linux/build-core.sh ~/core/${{ env.CORE_PKG }}
|
||||
run: scripts/simplex-chat-build.py build libs linux --host --out ~/core
|
||||
|
||||
- name: Upload core library
|
||||
uses: actions/upload-artifact@v7
|
||||
@@ -217,7 +217,7 @@ jobs:
|
||||
|
||||
- name: Install core library
|
||||
id: core
|
||||
run: scripts/ci/desktop-linux/install-core.sh ~/core/${{ env.CORE_PKG }}
|
||||
run: scripts/simplex-chat-build.py install libs linux ~/core/${{ env.CORE_PKG }}
|
||||
|
||||
- name: Download backend
|
||||
if: needs.plan.outputs.run-backend == 'true'
|
||||
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
- name: Artifact names
|
||||
id: names
|
||||
run: |
|
||||
echo "core=ios-sim-core-${{ hashFiles('src/**', 'cabal.project', 'simplex-chat.cabal', 'scripts/ci/ios-sim/build-core.sh') }}" >> "$GITHUB_OUTPUT"
|
||||
echo "core=ios-sim-core-${{ hashFiles('src/**', 'cabal.project', 'simplex-chat.cabal', 'scripts/simplex-chat-build.py', 'scripts/simplex_build/**', '!scripts/simplex_build/test_*.py', '!scripts/simplex_build/testing.py') }}" >> "$GITHUB_OUTPUT"
|
||||
echo "backend=ios-sim-backend-${{ hashFiles('src/**', 'apps/simplex-chat/**', 'apps/simplex-directory-service/Main.hs', 'apps/simplex-directory-service/src/**', 'cabal.project', 'simplex-chat.cabal', 'scripts/ci/ios-sim/build-backend.sh') }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Find core library
|
||||
@@ -95,9 +95,29 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: scripts/ci/ios-sim/earlier-run.sh "${{ steps.names.outputs.backend }}"
|
||||
|
||||
# the app must open this encrypted database, made by the previous release with its own OpenSSL
|
||||
old-database:
|
||||
name: previous release's database
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Make the database
|
||||
run: python3 scripts/simplex-chat-build.py test old-database --out "$RUNNER_TEMP/old-database"
|
||||
|
||||
- name: Upload the database
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ios-sim-old-database
|
||||
path: ${{ runner.temp }}/old-database
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
app:
|
||||
name: app in the iOS simulator
|
||||
needs: plan
|
||||
needs: [plan, old-database]
|
||||
runs-on: macos-26
|
||||
timeout-minutes: 360
|
||||
env:
|
||||
@@ -108,6 +128,9 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Use the release Xcode
|
||||
uses: ./.github/actions/xcode
|
||||
|
||||
- name: Show runner
|
||||
run: |
|
||||
sw_vers
|
||||
@@ -130,11 +153,11 @@ jobs:
|
||||
|
||||
- name: Install libraries
|
||||
if: env.BUILD_CORE == 'true'
|
||||
run: brew install openssl@3 libffi gmp
|
||||
run: brew install libffi gmp
|
||||
|
||||
- name: Build core library
|
||||
if: env.BUILD_CORE == 'true'
|
||||
run: scripts/ci/ios-sim/build-core.sh ~/Downloads/${{ env.CORE_PKG }}
|
||||
run: scripts/simplex-chat-build.py build libs ios-sim --out ~/Downloads
|
||||
|
||||
- name: Upload core library
|
||||
if: env.BUILD_CORE == 'true'
|
||||
@@ -156,9 +179,7 @@ jobs:
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
- name: Prepare libraries
|
||||
run: |
|
||||
scripts/ci/ios-sim/prepare-libs.sh
|
||||
scripts/ios/update-pbxproj.sh
|
||||
run: scripts/simplex-chat-build.py install libs ios ~/Downloads/${{ env.CORE_PKG }}
|
||||
|
||||
- name: Build backend
|
||||
if: env.BUILD_BACKEND == 'true'
|
||||
@@ -224,6 +245,15 @@ jobs:
|
||||
- name: Run smoke test
|
||||
run: scripts/ci/ios-sim/smoke-test.sh "$RUNNER_TEMP/DerivedData/Build/Products/Debug-iphonesimulator/SimpleX.app" "$RUNNER_TEMP/smoke-test" images
|
||||
|
||||
- name: Download the previous release's database
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: ios-sim-old-database
|
||||
path: ${{ runner.temp }}/old-database
|
||||
|
||||
- name: Open the previous release's database
|
||||
run: scripts/ci/ios-sim/old-database.sh "$RUNNER_TEMP/old-database"
|
||||
|
||||
- name: Stop test backend
|
||||
if: ${{ !cancelled() && env.START_BACKEND == 'true' }}
|
||||
run: scripts/ci/ios-sim/backend.sh stop "$RUNNER_TEMP/backend"
|
||||
@@ -271,6 +301,9 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Use the release Xcode
|
||||
uses: ./.github/actions/xcode
|
||||
|
||||
- name: Show runner
|
||||
run: |
|
||||
sw_vers
|
||||
|
||||
Reference in new issue
Block a user