Performance Test #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Performance Test | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Runs at 00:00 UTC every day | |
workflow_dispatch: | |
jobs: | |
performance_test: | |
runs-on: macos-latest | |
env: | |
OXEN_API_KEY: ${{ secrets.DEV_OXEN_API_KEY }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
brew update | |
brew install pkg-config || brew upgrade pkg-config | |
brew install ffmpeg imagemagick | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Install Bundler | |
run: gem install bundler | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install LLVM Linker | |
run: | | |
brew install llvm | |
echo '[target.aarch64-apple-darwin]' >> ~/.cargo/config | |
echo 'rustflags = ["-C", "link-arg=-fuse-ld=lld"]' >> ~/.cargo/config | |
- name: Brew Info LLVM | |
run: | | |
LLVM_INFO=$(brew info llvm) | |
echo "LLVM Information:" | |
echo "$LLVM_INFO" | |
- name: Install LLD | |
run: brew install lld | |
- name: Cache Rust dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install latest Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
target: x86_64-apple-darwin | |
default: true | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip || true | |
pip install -r cli-test/requirements.txt || true | |
- name: Build Rust project | |
run: cargo build | |
- name: Run tests | |
env: | |
PATH: ${{ env.PATH }}:${{ github.workspace }}/target/debug | |
run: | | |
cd cli-test | |
bundle install | |
bundle exec rspec spec/automated_test_cases/performance_test.rb |