Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2751bd8b4c |
@@ -29,11 +29,18 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
# The flutter tool runs git inside the workspace, which the container
|
||||
# user does not own after the checkout.
|
||||
# The flutter tool runs git inside the workspace and inside its own sdk,
|
||||
# and git refuses to work in directories it considers to belong to
|
||||
# somebody else.
|
||||
- name: Trust the workspace
|
||||
run: git config --global --add safe.directory '*'
|
||||
|
||||
# Everything the flutter download below needs.
|
||||
- name: Install the download tools
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
|
||||
- name: Set up Java
|
||||
uses: https://github.com/actions/setup-java@v4
|
||||
with:
|
||||
@@ -47,12 +54,19 @@ jobs:
|
||||
- name: Set up the Android sdk
|
||||
uses: https://github.com/android-actions/setup-android@v3
|
||||
|
||||
# `subosito/flutter-action` cannot be used: it caches the sdk through
|
||||
# `actions/cache@v5`, and the act-runner of this gitea instance only
|
||||
# supports actions up to node20 ("runs.using ... got node24"). Unpacking
|
||||
# the official archive does the same thing and pins the version exactly,
|
||||
# just like `ac_web/Dockerfile` does.
|
||||
- name: Set up Flutter
|
||||
uses: https://github.com/subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: stable
|
||||
cache: true
|
||||
run: |
|
||||
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
|
||||
| tar -xJ -C /opt
|
||||
echo "/opt/flutter/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Show the flutter version
|
||||
run: flutter --version
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
@@ -28,8 +28,9 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
# The flutter tool runs git inside the workspace, which the container
|
||||
# user does not own after the checkout.
|
||||
# The flutter tool runs git inside the workspace and inside its own sdk,
|
||||
# and git refuses to work in directories it considers to belong to
|
||||
# somebody else.
|
||||
- name: Trust the workspace
|
||||
run: git config --global --add safe.directory '*'
|
||||
|
||||
@@ -42,12 +43,19 @@ jobs:
|
||||
libgtk-3-dev liblzma-dev libstdc++-12-dev \
|
||||
curl unzip xz-utils
|
||||
|
||||
# `subosito/flutter-action` cannot be used: it caches the sdk through
|
||||
# `actions/cache@v5`, and the act-runner of this gitea instance only
|
||||
# supports actions up to node20 ("runs.using ... got node24"). Unpacking
|
||||
# the official archive does the same thing and pins the version exactly,
|
||||
# just like `ac_web/Dockerfile` does.
|
||||
- name: Set up Flutter
|
||||
uses: https://github.com/subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: stable
|
||||
cache: true
|
||||
run: |
|
||||
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
|
||||
| tar -xJ -C /opt
|
||||
echo "/opt/flutter/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Show the flutter version
|
||||
run: flutter --version
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
@@ -44,6 +44,7 @@ Widget tests run against a mocked backend: build a `MockClient` that answers by
|
||||
|
||||
Notes that are easy to get wrong:
|
||||
|
||||
- **The act-runner of the gitea instance only supports actions up to `node20`.** Anything newer fails with `The runs.using key in action.yml must be one of: [...], got node24`, which is why the Flutter sdk is unpacked from the official archive instead of through `subosito/flutter-action` (that one caches through `actions/cache@v5`). Check the `runs.using` of an action before adding it.
|
||||
- The Flutter version is pinned in three places (`FLUTTER_VERSION` in both build workflows, `ARG FLUTTER_VERSION` in `ac_web/Dockerfile`) and must be kept in sync.
|
||||
- Steps run with `working-directory: ac_web`, but `upload-artifact` paths are relative to the repository root.
|
||||
- The workflows are read from the tag the release points at, so they have to be committed **before** the release is created.
|
||||
|
||||
Reference in New Issue
Block a user