|
|
@ -26,10 +26,7 @@ jobs:
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: helix-editor/rust-toolchain@v1
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
|
|
|
|
profile: minimal
|
|
|
|
|
|
|
|
override: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
|
|
|
|
|
|
|
@ -47,6 +44,16 @@ jobs:
|
|
|
|
dist:
|
|
|
|
dist:
|
|
|
|
name: Dist
|
|
|
|
name: Dist
|
|
|
|
needs: [fetch-grammars]
|
|
|
|
needs: [fetch-grammars]
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
# For some builds, we use cross to test on 32-bit and big-endian
|
|
|
|
|
|
|
|
# systems.
|
|
|
|
|
|
|
|
CARGO: cargo
|
|
|
|
|
|
|
|
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
|
|
|
|
|
|
|
|
TARGET_FLAGS:
|
|
|
|
|
|
|
|
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
|
|
|
|
|
|
|
|
TARGET_DIR: ./target
|
|
|
|
|
|
|
|
# Emit backtraces on panics.
|
|
|
|
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false # don't fail other jobs if one fails
|
|
|
|
fail-fast: false # don't fail other jobs if one fails
|
|
|
@ -107,12 +114,10 @@ jobs:
|
|
|
|
tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources
|
|
|
|
tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install ${{ matrix.rust }} toolchain
|
|
|
|
- name: Install ${{ matrix.rust }} toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
override: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Install a pre-release version of Cross
|
|
|
|
# Install a pre-release version of Cross
|
|
|
|
# TODO: We need to pre-install Cross because we need cross-rs/cross#591 to
|
|
|
|
# TODO: We need to pre-install Cross because we need cross-rs/cross#591 to
|
|
|
@ -120,15 +125,20 @@ jobs:
|
|
|
|
# 0.3.0, which includes cross-rs/cross#591, is released.
|
|
|
|
# 0.3.0, which includes cross-rs/cross#591, is released.
|
|
|
|
- name: Install Cross
|
|
|
|
- name: Install Cross
|
|
|
|
if: "matrix.cross"
|
|
|
|
if: "matrix.cross"
|
|
|
|
run: cargo install cross --git https://github.com/cross-rs/cross.git --rev 47df5c76e7cba682823a0b6aa6d95c17b31ba63a
|
|
|
|
run: |
|
|
|
|
|
|
|
|
cargo install cross --git https://github.com/cross-rs/cross.git --rev 47df5c76e7cba682823a0b6aa6d95c17b31ba63a
|
|
|
|
|
|
|
|
echo "CARGO=cross" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
# echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
# echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Show command used for Cargo
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
echo "cargo command is: ${{ env.CARGO }}"
|
|
|
|
|
|
|
|
echo "target flag is: ${{ env.TARGET_FLAGS }}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run cargo test
|
|
|
|
- name: Run cargo test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
|
|
|
|
if: "!matrix.skip_tests"
|
|
|
|
if: "!matrix.skip_tests"
|
|
|
|
with:
|
|
|
|
run: ${{ env.CARGO }} test --release --locked --target ${{ matrix.target }} --workspace
|
|
|
|
use-cross: ${{ matrix.cross }}
|
|
|
|
|
|
|
|
command: test
|
|
|
|
|
|
|
|
args: --release --locked --target ${{ matrix.target }} --workspace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set profile.release.strip = true
|
|
|
|
- name: Set profile.release.strip = true
|
|
|
|
shell: bash
|
|
|
|
shell: bash
|
|
|
@ -139,11 +149,7 @@ jobs:
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build release binary
|
|
|
|
- name: Build release binary
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
run: ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }}
|
|
|
|
with:
|
|
|
|
|
|
|
|
use-cross: ${{ matrix.cross }}
|
|
|
|
|
|
|
|
command: build
|
|
|
|
|
|
|
|
args: --release --locked --target ${{ matrix.target }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build AppImage
|
|
|
|
- name: Build AppImage
|
|
|
|
shell: bash
|
|
|
|
shell: bash
|
|
|
|