mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge branch 'main' into test_wc_use_variables_directly_in_format_strings
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
name: Android
|
||||
|
||||
# spell-checker:ignore TERMUX reactivecircus Swatinem noaudio pkill swiftshader
|
||||
# spell-checker:ignore TERMUX reactivecircus Swatinem noaudio pkill swiftshader dtolnay juliangruber
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
@@ -25,13 +25,8 @@ jobs:
|
||||
arch: [x86] # , arm64-v8a
|
||||
env:
|
||||
TERMUX: v0.118.0
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
- name: Restore AVD cache
|
||||
uses: actions/cache/restore@v3
|
||||
id: avd-cache
|
||||
@@ -40,7 +35,8 @@ jobs:
|
||||
~/.android/avd/*
|
||||
~/.android/avd/*/snapshots/*
|
||||
~/.android/adb*
|
||||
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}+nextest
|
||||
~/__rustc_hash__
|
||||
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}+nextest+rustc-hash
|
||||
- name: Create and cache emulator image
|
||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
@@ -49,16 +45,11 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
arch: ${{ matrix.arch }}
|
||||
ram-size: 2048M
|
||||
disk-size: 5120M
|
||||
disk-size: 7GB
|
||||
force-avd-creation: true
|
||||
emulator-options: -no-snapshot-load -noaudio -no-boot-anim -camera-back none
|
||||
script: |
|
||||
set -e
|
||||
wget https://github.com/termux/termux-app/releases/download/${{ env.TERMUX }}/termux-app_${{ env.TERMUX }}+github-debug_${{ matrix.arch }}.apk
|
||||
util/android-commands.sh snapshot termux-app_${{ env.TERMUX }}+github-debug_${{ matrix.arch }}.apk
|
||||
adb -s emulator-5554 emu avd snapshot save ${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}
|
||||
echo "Emulator image created."
|
||||
pkill -9 qemu-system-x86_64
|
||||
util/android-commands.sh init "${{ matrix.arch }}" "${{ matrix.api-level }}" "${{ env.TERMUX }}"
|
||||
- name: Save AVD cache
|
||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v3
|
||||
@@ -67,7 +58,22 @@ jobs:
|
||||
~/.android/avd/*
|
||||
~/.android/avd/*/snapshots/*
|
||||
~/.android/adb*
|
||||
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}+nextest
|
||||
~/__rustc_hash__
|
||||
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}+nextest+rustc-hash
|
||||
- uses: juliangruber/read-file-action@v1
|
||||
id: read_rustc_hash
|
||||
with:
|
||||
# ~ expansion didn't work
|
||||
path: /Users/runner/__rustc_hash__
|
||||
trim: true
|
||||
- name: Restore rust cache
|
||||
id: rust-cache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ~/__rust_cache__
|
||||
# The version vX at the end of the key is just a development version to avoid conflicts in
|
||||
# the github cache during the development of this workflow
|
||||
key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3
|
||||
- name: Build and Test
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
@@ -75,10 +81,20 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
arch: ${{ matrix.arch }}
|
||||
ram-size: 2048M
|
||||
disk-size: 5120M
|
||||
disk-size: 7GB
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -snapshot ${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}
|
||||
# This is not a usual script. Every line is executed in a separate shell with `sh -c`. If
|
||||
# one of the lines returns with error the whole script is failed (like running a script with
|
||||
# set -e) and in consequences the other lines (shells) are not executed.
|
||||
script: |
|
||||
util/android-commands.sh sync
|
||||
util/android-commands.sh sync_host
|
||||
util/android-commands.sh build
|
||||
util/android-commands.sh tests
|
||||
if [[ "${{ steps.rust-cache.outputs.cache-hit }}" != 'true' ]]; then util/android-commands.sh sync_image; fi; exit 0
|
||||
- name: Save rust cache
|
||||
if: steps.rust-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ~/__rust_cache__
|
||||
key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3
|
||||
|
||||
@@ -43,3 +43,10 @@ therefore welcomed.
|
||||
|
||||
`cut` can separate fields by whitespace (Space and Tab) with `-w` flag. This
|
||||
feature is adopted from [FreeBSD](https://www.freebsd.org/cgi/man.cgi?cut).
|
||||
|
||||
## `fmt`
|
||||
|
||||
`fmt` has additional flags for prefixes: `-P/--skip-prefix`, `-x/--exact-prefix`, and
|
||||
`-X/--exact-skip-prefix`. With `-m/--preserve-headers`, an attempt is made to detect and preserve
|
||||
mail headers in the input. `-q/--quick` breaks lines more quickly. And `-T/--tab-width` defines the
|
||||
number of spaces representing a tab when determining the line length.
|
||||
|
||||
+306
-107
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user