Skip to content

Merge pull request #68 from greymd/feature/update_crates #358

Merge pull request #68 from greymd/feature/update_crates

Merge pull request #68 from greymd/feature/update_crates #358

Workflow file for this run

name: Tests for UNIX-like OS
on:
push:
branches:
- main
- 'develop-**'
- 'bugfix/**'
- 'feature/**'
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
test:
name: test
runs-on: ${{matrix.os}}
if: "! contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
include:
- build: linux-musl
os: ubuntu-latest
target: x86_64-unknown-linux-musl
- build: mac
os: macOS-latest
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v3
- name: Install musl-gcc if required
if: contains(matrix.target, 'musl')
run: |
sudo apt-get install musl-tools
- name: Build the release target
run: |
rustup target add ${{ matrix.target }}
if [[ ${{ matrix.target }} =~ "musl" ]] ;then
CFLAGS="-fPIE" CC="musl-gcc -static" cargo build --features oniguruma --release --verbose --target x86_64-unknown-linux-musl
else
cargo build --verbose --features oniguruma --release --target ${{ matrix.target }}
fi
mv target/${{matrix.target}}/release/teip target/release
- name: Run tests
timeout-minutes: 10
run: |
cargo test --verbose --features oniguruma
bash tests/test_large_file.sh
bash tests/test_long_line.sh