mirror of
https://github.com/aphrody-labs/mullvadvpn-app.git
synced 2026-10-13 22:10:39 +00:00
The build container now installs packages from snapshot.debian.org with `check-valid-until=no` set in its sources, so apt no longer needs to be told to ignore expired Release files.
123 lines
3.9 KiB
YAML
123 lines
3.9 KiB
YAML
# Compile the test framework
|
|
---
|
|
name: DES Testframework - Build
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '**'
|
|
- '!**/**.md'
|
|
- '!.github/workflows/**'
|
|
- '.github/workflows/testframework.yml'
|
|
- "!.github/CODEOWNERS"
|
|
- '!android/**'
|
|
- 'android/translations-converter/**'
|
|
- '!audits/**'
|
|
- '!build.sh'
|
|
- '!ci/**'
|
|
- 'ci/cargo-ci.sh'
|
|
- '!clippy.toml'
|
|
- "!code-owners.json"
|
|
- '!deny.toml'
|
|
- '!docs/**'
|
|
- '!graphics/**'
|
|
- '!desktop/**'
|
|
- '!ios/**'
|
|
- '!scripts/**'
|
|
- '!.*ignore'
|
|
- '!prepare-release.sh'
|
|
- '!rustfmt.toml'
|
|
- '!.yamllint'
|
|
- '!**/osv-scanner.toml'
|
|
# Runs on main to populate and refresh the Rust cache in mullvad-build-env
|
|
schedule:
|
|
- cron: '0 3 * * *'
|
|
timezone: 'Europe/Stockholm'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
prepare-build-test-framework-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Use custom container image if specified
|
|
if: ${{ github.event.inputs.override_container_image != '' }}
|
|
run: echo "inner_container_image=${{ github.event.inputs.override_container_image }}"
|
|
>> $GITHUB_ENV
|
|
|
|
- name: Use default container image and resolve digest
|
|
if: ${{ github.event.inputs.override_container_image == '' }}
|
|
run: echo "inner_container_image=$(cat ./building/linux-container-image.txt)" >> $GITHUB_ENV
|
|
|
|
outputs:
|
|
container_image: ${{ env.inner_container_image }}
|
|
|
|
# Build the test runner + test manager at once.
|
|
build-test-framework-linux:
|
|
needs: prepare-build-test-framework-linux
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ${{ needs.prepare-build-test-framework-linux.outputs.container_image }}
|
|
|
|
steps:
|
|
# Fix for HOME path overridden by GH runners when building in containers, see:
|
|
# https://github.com/actions/runner/issues/863
|
|
- name: Fix HOME path
|
|
run: echo "HOME=/root" >> $GITHUB_ENV
|
|
|
|
- name: Install system dependencies # Needed to build test-manager, and is not included in the app container.
|
|
run: apt update && apt install -y pkg-config libssl-dev libpcap-dev
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Build test framework
|
|
working-directory: test
|
|
run: ../ci/cargo-ci.sh build
|
|
|
|
# Build the test runner + test manager at once.
|
|
build-test-framework-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- uses: ./.github/actions/mullvad-build-env
|
|
with:
|
|
workspaces: test
|
|
|
|
- name: Build test runner
|
|
working-directory: test
|
|
run: ../ci/cargo-ci.sh build
|
|
|
|
# Build only the test-runner binary on Windows. Windows is not a supported host for test-manager.
|
|
build-test-runner-windows:
|
|
# Cross-compile the test runner for Windows from Linux.
|
|
needs: prepare-build-test-framework-linux
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ${{ needs.prepare-build-test-framework-linux.outputs.container_image }}
|
|
continue-on-error: true
|
|
steps:
|
|
# Fix for HOME path overridden by GH runners when building in containers, see:
|
|
# https://github.com/actions/runner/issues/863
|
|
- name: Fix HOME path
|
|
run: echo "HOME=/root" >> $GITHUB_ENV
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install Rust target
|
|
run: rustup target add x86_64-pc-windows-gnu
|
|
|
|
- name: Build test runner
|
|
working-directory: test
|
|
run: ../ci/cargo-ci.sh build -p test-runner --target x86_64-pc-windows-gnu
|