mirror of
https://github.com/foxhole-team/foxhole-guard.git
synced 2026-10-21 10:45:41 +02:00
ci: prepare native dependencies and migrate actions to Node 24
This commit is contained in:
@@ -27,7 +27,7 @@ runs:
|
||||
echo "revision=$revision" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: checkout pinned public FoxHole Core
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
repository: ${{ inputs.core-repository }}
|
||||
ref: ${{ steps.foxcore-pin.outputs.revision }}
|
||||
@@ -35,14 +35,14 @@ runs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: setup Java
|
||||
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
|
||||
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
cache: gradle
|
||||
|
||||
- name: setup Gradle
|
||||
uses: gradle/actions/setup-gradle@0b6dd653ba04f4f93bf581ec31e66cbd7dcb644d # v4
|
||||
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5
|
||||
|
||||
- name: install the Rust toolchain pinned by the FoxHole Core workspace
|
||||
shell: bash
|
||||
@@ -102,6 +102,12 @@ runs:
|
||||
"build-tools;37.0.0" \
|
||||
"ndk;29.0.14206865"
|
||||
|
||||
- name: fetch pinned native dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
scripts/fetch-native-deps.sh
|
||||
|
||||
- name: install cargo-ndk and fetch locked Rust dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
@@ -32,9 +32,6 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
||||
|
||||
concurrency:
|
||||
group: android-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
@@ -47,7 +44,7 @@ jobs:
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
submodules: recursive
|
||||
persist-credentials: false
|
||||
@@ -90,7 +87,7 @@ jobs:
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: checkout verified dev commit
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
submodules: recursive
|
||||
persist-credentials: false
|
||||
@@ -189,7 +186,7 @@ jobs:
|
||||
"$source_tree"
|
||||
|
||||
- name: upload immutable candidate
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
with:
|
||||
name: foxhole-app-${{ github.sha }}
|
||||
path: ${{ runner.temp }}/foxhole-release-candidate/*
|
||||
@@ -199,7 +196,7 @@ jobs:
|
||||
|
||||
# Mapping and native symbols stay authenticated Actions artifacts, never attached to the public release.
|
||||
- name: retain private diagnostics
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
with:
|
||||
name: foxhole-private-diagnostics-${{ github.sha }}
|
||||
path: |
|
||||
|
||||
@@ -12,9 +12,6 @@ permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
||||
|
||||
concurrency:
|
||||
group: release-main
|
||||
cancel-in-progress: false
|
||||
@@ -27,7 +24,7 @@ jobs:
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: checkout main
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
@@ -123,7 +120,7 @@ jobs:
|
||||
run: sdkmanager "build-tools;37.0.0"
|
||||
|
||||
- name: download exact dev candidate
|
||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
|
||||
with:
|
||||
name: ${{ steps.candidate.outputs.artifact_name }}
|
||||
path: ${{ runner.temp }}/foxhole-release-candidate
|
||||
@@ -170,7 +167,7 @@ jobs:
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: attest exact release files
|
||||
uses: actions/attest-build-provenance@96b4a1ef7235a096b17240c259729fdd70c83d45 # v2
|
||||
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4
|
||||
with:
|
||||
subject-path: ${{ runner.temp }}/foxhole-release-candidate/*
|
||||
|
||||
|
||||
@@ -890,8 +890,8 @@
|
||||
<string name="cli_lock_biometric">биометрическая защита</string>
|
||||
<string name="cli_common_failed">не удалось</string>
|
||||
<string name="cli_common_yes_confirm">подтвердить</string>
|
||||
<string name="cli_terminal_clear_title">очистить историю терминала</string>
|
||||
<string name="cli_terminal_clear_question">удалить всю сохранённую историю терминала?</string>
|
||||
<string name="cli_terminal_clear_title">очистить историю в консоли?</string>
|
||||
<string name="cli_terminal_clear_question">удалить сохранённую историю команд и подключений в консоли приложения?</string>
|
||||
<string name="cli_home_section_console">консоль</string>
|
||||
<string name="cli_home_section_current_info">статус</string>
|
||||
<string name="cli_home_current_info_help">Для быстрого выбора профиля VPN нажмите на эту область приложения в любом месте.</string>
|
||||
@@ -1145,7 +1145,7 @@
|
||||
<string name="cli_cfg_latency_method">метод определения задержки</string>
|
||||
<string name="cli_cfg_atomic_connection">атомарное переключение сценариев</string>
|
||||
<string name="cli_cfg_atomic_connection_note">если выключено, каждое переключение режима работы или сценария VPN/Tor требует подтверждения; правила сети всегда применяются атомарно</string>
|
||||
<string name="cli_cfg_terminal_clear">очистка истории терминала</string>
|
||||
<string name="cli_cfg_terminal_clear">очистка истории консоли</string>
|
||||
<string name="cli_cfg_firewall">фаервол</string>
|
||||
<string name="cli_firewall_quarantine_title">карантин новых приложений</string>
|
||||
<string name="cli_firewall_quarantine_needs_firewall">карантин доступен только с включенным модулем фаервола</string>
|
||||
|
||||
@@ -880,8 +880,8 @@
|
||||
<string name="cli_lock_biometric">biometric protection</string>
|
||||
<string name="cli_common_failed">failed</string>
|
||||
<string name="cli_common_yes_confirm">confirm</string>
|
||||
<string name="cli_terminal_clear_title">clear terminal history</string>
|
||||
<string name="cli_terminal_clear_question">delete all saved terminal history?</string>
|
||||
<string name="cli_terminal_clear_title">clear console history?</string>
|
||||
<string name="cli_terminal_clear_question">delete saved command and connection history in the app console?</string>
|
||||
<string name="cli_home_section_console">console</string>
|
||||
<string name="cli_home_section_current_info">status</string>
|
||||
<string name="cli_home_current_info_help">For quick VPN profile selection, tap anywhere in this area of the app.</string>
|
||||
@@ -1130,7 +1130,7 @@
|
||||
<string name="cli_route_sites_invalid">invalid web address</string>
|
||||
<string name="cli_home_key_protocol">VPN protocol</string>
|
||||
<string name="cli_cfg_latency_method">latency measurement method</string>
|
||||
<string name="cli_cfg_terminal_clear">clear terminal history</string>
|
||||
<string name="cli_cfg_terminal_clear">clear console history</string>
|
||||
<string name="cli_cfg_firewall">firewall</string>
|
||||
<string name="cli_firewall_quarantine_title">new app quarantine</string>
|
||||
<string name="cli_firewall_quarantine_needs_firewall">the quarantine works only with the firewall module on</string>
|
||||
|
||||
@@ -453,6 +453,41 @@ class ReleaseEngineeringContractTest {
|
||||
assertTrue(script.contains("require_offline_seed"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `CI seeds the native dependency tree before Gradle license generation`() {
|
||||
val setup = projectFile("../.github/actions/setup-foxcore/action.yml").readText()
|
||||
|
||||
val fetchIndex = setup.indexOf("scripts/fetch-native-deps.sh")
|
||||
val gradleIndex = setup.indexOf("install cargo-ndk and fetch locked Rust dependencies")
|
||||
assertTrue(fetchIndex >= 0)
|
||||
assertTrue(gradleIndex > fetchIndex)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `GitHub actions use Node 24 runtimes without the legacy override`() {
|
||||
val workflowPaths =
|
||||
listOf(
|
||||
"../.github/workflows/android.yml",
|
||||
"../.github/workflows/release.yml",
|
||||
"../.github/actions/setup-foxcore/action.yml",
|
||||
)
|
||||
val workflows = workflowPaths.joinToString("\n") { path -> projectFile(path).readText() }
|
||||
|
||||
assertFalse(workflows.contains("FORCE_JAVASCRIPT_ACTIONS_TO_NODE24"))
|
||||
assertFalse(workflows.contains("11d5960a326750d5838078e36cf38b85af677262"))
|
||||
assertFalse(workflows.contains("cf277c60eb25467037889841efdb72551f06f6c3"))
|
||||
assertFalse(workflows.contains("0b6dd653ba04f4f93bf581ec31e66cbd7dcb644d"))
|
||||
assertFalse(workflows.contains("ea165f8d65b6e75b540449e92b4886f43607fa02"))
|
||||
assertFalse(workflows.contains("d3f86a106a0bac45b974a628896c90dbdf5c8093"))
|
||||
assertFalse(workflows.contains("96b4a1ef7235a096b17240c259729fdd70c83d45"))
|
||||
assertTrue(workflows.contains("actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09"))
|
||||
assertTrue(workflows.contains("actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961"))
|
||||
assertTrue(workflows.contains("gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c"))
|
||||
assertTrue(workflows.contains("actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f"))
|
||||
assertTrue(workflows.contains("actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131"))
|
||||
assertTrue(workflows.contains("actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `signed candidate is built only on trusted dev push and main publishes those exact bytes`() {
|
||||
val androidWorkflow = projectFile("../.github/workflows/android.yml").readText()
|
||||
|
||||
Reference in New Issue
Block a user