Skip to content

Commit

Permalink
try macos
Browse files Browse the repository at this point in the history
  • Loading branch information
sverrejb committed Mar 12, 2024
1 parent 1b4542d commit bfe1dda
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/take_screenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ env:
DISPLAY: :99
SLINT_FULLSCREEN: 1
RUST_LOG: debug
SLINT_BACKEND: linuxkms-skia-vulkan
SLINT_DRM_OUTPUT: list

jobs:
build:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -44,28 +42,22 @@ jobs:
key: ${{ runner.os }}-cargo-build-target-foo-${{ hashFiles('**/Cargo.lock') }}

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y xvfb x11-apps scrot imagemagick libxkbcommon-x11-0
run: brew install imagemagick

- name: Build
run: cargo build --release

- name: Start Xvfb
- name: Run and take screenshot
run: |
Xvfb :99 -screen 0 768x1024x24 & > /dev/null 2>&1 &
sleep 5
cargo run --release > cargo.log 2>&1 &
sleep 30
cat cargo.log
xwd -root -out screenshot.xwd
convert screenshot.xwd fooPoop.png
scrot screenshot.png
screencapture -x screenshot.png
- name: Commit and push screenshot
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add screenshot" -a
git push
git push

0 comments on commit bfe1dda

Please sign in to comment.