Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Can't load Kernel binary: Invalid kernel binary format version" for protoc #756

Merged
merged 5 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 35 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ commands:
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v21.11/protoc-21.11-linux-x86_64.zip"
unzip protoc*.zip -d $HOME/.local
echo 'export PATH=$HOME/.local/bin:$PATH' >> $BASH_ENV
- run:
name: Install Flutter plugin
# Do not use the dart from fvm here for installing protoc_plugin.
# Else we might get a "Can't load Kernel binary: Invalid kernel binary format version" because the dart
# versions do not match.
command: dart pub global activate protoc_plugin
install-protobuf-mac:
steps:
- run:
Expand All @@ -100,31 +106,35 @@ commands:
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v21.11/protoc-21.11-osx-x86_64.zip"
unzip protoc*.zip -d $HOME/.local
echo 'export PATH=$HOME/.local/bin:$PATH' >> $BASH_ENV
- run:
name: Install Flutter plugin
# Use dart directly here. See comment in install-protobuf-linux
command: dart pub global activate protoc_plugin
install-fvm-linux:
steps:
- install-dart-linux
- run:
name: Install FVM
command: |
dart pub global activate fvm
echo 'export PATH=$HOME/.pub-cache/bin:$PATH' >> $BASH_ENV
- restore_cache:
keys:
- flutter-3-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
- fvm-0-{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
- run:
name: Install Flutter
command: |
fvm --verbose install
command: fvm install
- save_cache:
key: flutter-3-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
key: fvm-0-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
paths:
- .fvm
- ~/fvm/
- run:
name: Setup flutter
command: fvm flutter --version
- run:
name: Configure Flutter
command: |
fvm --verbose flutter config --no-analytics
install-fvm-mac:
command: fvm flutter config --no-analytics
install-dart-fvm-mac:
steps:
- run:
name: Install Standalone FVM (with Dart)
Expand All @@ -133,20 +143,22 @@ commands:
brew install fvm
- restore_cache:
keys:
- flutter-3-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
- fvm-0-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
- run:
name: Install Flutter
command: |
fvm --verbose install
command: fvm install
- save_cache:
key: flutter-3-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
key: fvm-0-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }}
paths:
- .fvm
- ~/fvm/
- run:
name: Setup flutter
command: fvm flutter --version
- run:
name: Configure Flutter
command: |
fvm --verbose flutter config --no-analytics
fvm flutter config --no-analytics

jobs:
check-frontend:
Expand All @@ -157,22 +169,21 @@ jobs:
steps:
- checkout:
path: ~/project
- install-dart-linux
- install-fvm-linux
- install-app-toolbelt
- install-protobuf-linux
- run:
name: Install Flutter Packages
command: |
fvm dart pub global activate protoc_plugin
fvm flutter pub get
command: fvm flutter pub get
- run:
name: Check Formatting
command: fvm flutter format -l 120 -o none --set-exit-if-changed .
- run:
name: Build Runner
command: |
# Statically use "bayern" build config for analyzing here
fvm --verbose flutter pub run build_runner build --define "df_build_config=name=bayern"
fvm flutter pub run build_runner build --define "df_build_config=name=bayern"
- run:
name: Check Analyzer and Linting
command: |
Expand Down Expand Up @@ -203,30 +214,23 @@ jobs:
steps:
- checkout:
path: ~/project
- install-dart-linux
- install-fvm-linux
- install-app-toolbelt
- install-protobuf-linux
- restore_cache:
keys:
- pub-2-{{ checksum "pubspec.lock" }}-{{ arch }}
- run:
name: Install Flutter Packages
command: |
fvm dart pub global activate protoc_plugin
fvm flutter pub get
fvm flutter precache --android
- save_cache:
key: pub-2-{{ checksum "pubspec.lock" }}-{{ arch }}
paths:
- .dart_tool
- run:
name: Build Runner
command: |
fvm --verbose flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>"
fvm flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>"
- run:
name: Build
command: |
fvm --verbose flutter build apk --dart-define=environment=production --flavor << parameters.flutterFlavor >> --release -t lib/main.dart
fvm flutter build apk --dart-define=environment=production --flavor << parameters.flutterFlavor >> --release -t lib/main.dart
- store_artifacts:
path: build/app/outputs/flutter-apk/

Expand All @@ -244,22 +248,14 @@ jobs:
steps:
- checkout:
path: ~/project
- install-fvm-mac
- install-dart-fvm-mac
- install-app-toolbelt
- install-protobuf-mac
- restore_cache:
keys:
- pub-2-{{ checksum "pubspec.lock" }}-{{ arch }}
- run:
name: Install Flutter Packages
command: |
fvm dart pub global activate protoc_plugin
fvm flutter pub get
fvm flutter precache --ios
- save_cache:
key: pub-2-{{ checksum "pubspec.lock" }}-{{ arch }}
paths:
- .dart_tool
- run:
name: Update Pods
command: |
Expand All @@ -269,12 +265,12 @@ jobs:
- run:
name: Build Runner
command: |
fvm --verbose flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>"
fvm flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>"
- run:
name: Build
command: |
app-toolbelt v0 build-config write-xcconfig "<< parameters.buildConfig >>" ios --directory ios/
fvm --verbose flutter build ios --dart-define=environment=production --flavor << parameters.flutterFlavor >> --no-codesign --release -t lib/main.dart
fvm flutter build ios --dart-define=environment=production --flavor << parameters.flutterFlavor >> --no-codesign --release -t lib/main.dart

backend-build:
environment:
Expand Down Expand Up @@ -327,6 +323,7 @@ jobs:
- restore_cache:
keys:
- v1-node-modules-{{ checksum "package.json" }}-{{checksum "package-lock.json" }}
- install-dart-linux
- install-protobuf-linux
- run:
name: Install node dependencies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const dataPrivacyBaseHeadline = 'Datenschutzerklärung für die Nutzung und Beantragung des digitalen NürnbergPass'
export const dataPrivacyBaseHeadline =
'Datenschutzerklärung für die Nutzung und Beantragung des digitalen Nürnberg-Pass'

/* Generated using https://magic.reactjs.net/htmltojsx.htm
Instructions:
Expand Down