Merge pull request #3230 from shadowsocks/bump-version-5.3.5 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E Test | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| e2e-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: jetbrains | |
| java-version: 21 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-linux-android | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ | |
| | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Gradle cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: gradle-${{ hashFiles('**/*.gradle*', 'gradle/wrapper/gradle-wrapper.properties') }} | |
| - name: Cargo cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| core/src/main/rust/shadowsocks-rust/target | |
| key: cargo-${{ hashFiles('core/src/main/rust/shadowsocks-rust/Cargo.lock') }} | |
| - name: Build debug APK (x86_64) | |
| run: ./gradlew assembleDebug -PCARGO_PROFILE=debug -PTARGET_ABI=x86_64 | |
| - name: Build ssserver | |
| run: | | |
| cd core/src/main/rust/shadowsocks-rust | |
| cargo build --release --bin ssserver --features "server,aead-cipher,logging" | |
| - name: E2E Test | |
| uses: ReactiveCircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 34 | |
| target: google_apis | |
| arch: x86_64 | |
| force-avd-creation: true | |
| emulator-options: >- | |
| -no-snapshot-save -no-window -gpu swiftshader_indirect | |
| -noaudio -no-boot-anim | |
| disable-animations: true | |
| script: bash test-e2e.sh | |
| env: | |
| SKIP_EMULATOR_BOOT: "true" | |
| ADB: adb | |
| APK: ${{ github.workspace }}/mobile/build/outputs/apk/debug/mobile-x86_64-debug.apk | |
| SSSERVER: ${{ github.workspace }}/core/src/main/rust/shadowsocks-rust/target/release/ssserver | |
| - name: Upload screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: e2e-screenshots | |
| path: screen_*.png |