mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-24 12:48:55 +00:00
github: add action to check dotslash files
This ensures that they can't bitrot and at least launch on all platforms. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
0b8ef2bfa0
commit
7f91da2088
2 changed files with 71 additions and 0 deletions
30
.github/actions/install-dotslash/action.yml
vendored
Normal file
30
.github/actions/install-dotslash/action.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Install DotSlash
|
||||
description: Install DotSlash on the current system
|
||||
inputs:
|
||||
version:
|
||||
description: "version of dotslash"
|
||||
required: false
|
||||
default: "0.4.1"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install DotSlash
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p $RUNNER_TEMP/dotslash
|
||||
echo "$RUNNER_TEMP/dotslash" >> $GITHUB_PATH
|
||||
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
C:\\msys64\\usr\\bin\\wget.exe https://github.com/facebook/dotslash/releases/download/v0.4.1/dotslash-windows.v0.4.1.tar.gz
|
||||
tar xf dotslash-windows.v0.4.1.tar.gz
|
||||
mv dotslash.exe $RUNNER_TEMP/dotslash
|
||||
else
|
||||
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||
wget https://github.com/facebook/dotslash/releases/download/v0.4.1/dotslash-macos.v0.4.1.tar.gz
|
||||
tar xf dotslash-macos.v0.4.1.tar.gz
|
||||
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
||||
wget https://github.com/facebook/dotslash/releases/download/v0.4.1/dotslash-ubuntu-22.04.x86_64.v0.4.1.tar.gz
|
||||
tar xf dotslash-ubuntu-22.04.x86_64.v0.4.1.tar.gz
|
||||
fi
|
||||
mv dotslash $RUNNER_TEMP/dotslash
|
||||
fi
|
41
.github/workflows/check-dotslash.yml
vendored
Normal file
41
.github/workflows/check-dotslash.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: check dotslash files
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
nix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
abi: x86_64-unknown-linux-gnu
|
||||
- os: windows-latest
|
||||
abi: x86_64-pc-windows-msvc
|
||||
- os: macos-latest
|
||||
abi: aarch64-apple-darwin
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15 # NOTE (aseipp): keep in-sync with the build.yml timeout limit
|
||||
|
||||
name: check dotslash files
|
||||
steps:
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
||||
- name: Install DotSlash
|
||||
uses: ./.github/actions/install-dotslash
|
||||
- shell: bash
|
||||
run: |
|
||||
for x in $(ls tools/bin); do
|
||||
if [ "$x" = "README.md" ]; then
|
||||
continue;
|
||||
fi
|
||||
if ! dotslash "tools/bin/$x" --help; then
|
||||
echo "error: $x failed to run on ${{ matrix.abi }}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue