Check if steam is running before trying to shut it down #66
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: Test/Build | |
# TODO: also run cargo clippy | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# This tests the CLI and core lib functionality | |
cli_test: | |
runs-on: ubuntu-latest | |
container: | |
image: gleesus/decktricks | |
steps: | |
- name: Preserve $HOME set in the container | |
run: echo HOME=/root >> "$GITHUB_ENV" | |
- uses: actions/checkout@v4 | |
- name: Run CLI Tests | |
run: cargo test | |
# TODO: package CLI into separate tar here | |
cli_test_release: | |
runs-on: ubuntu-latest | |
container: | |
image: gleesus/decktricks | |
steps: | |
- name: Preserve $HOME set in the container | |
run: echo HOME=/root >> "$GITHUB_ENV" | |
- uses: actions/checkout@v4 | |
- name: Run CLI Tests (Release) | |
run: cargo test --release | |
# This tests only some basic GUI functionality | |
gui_build_and_test: | |
runs-on: ubuntu-latest | |
container: | |
image: gleesus/decktricks | |
steps: | |
- name: Preserve $HOME set in the container | |
run: echo HOME=/root >> "$GITHUB_ENV" | |
- uses: actions/checkout@v4 | |
- run: ./ci_scripts/init.sh | |
# NOTE: the following steps could be parallelized, if it helps | |
- run: ./ci_scripts/place_build_assets.sh | |
- run: ./ci_scripts/cli.sh | |
- run: ./ci_scripts/gui.sh | |
- run: ./ci_scripts/compress.sh | |
- name: Get binary from tar | |
run: | | |
mkdir /tmp/decktricks_work | |
tar xvf ./build/decktricks.tar.xz -C /tmp/decktricks_work | |
- name: Run GUI e2e scripts | |
run: ./scripts/run_all_gui_e2e_tests.sh /tmp/decktricks_work/decktricks-gui | |
# These are separate so that if-no-files-found actually errors if just one is missing {{{ | |
- name: Upload tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: verified-gui-tar | |
path: ./build/decktricks.tar.xz | |
if-no-files-found: error | |
- name: Upload installer desktop | |
uses: actions/upload-artifact@v4 | |
with: | |
name: verified-gui-installer-desktop | |
path: ./build/decktricks-install.desktop | |
if-no-files-found: error | |
- name: Upload installer script | |
uses: actions/upload-artifact@v4 | |
with: | |
name: verified-gui-installer-script | |
path: ./build/decktricks-install.sh | |
if-no-files-found: error | |
# }}} | |
# TODO: ensure this is enough gating to prevent branch/main PRs from triggering latest tags | |
update_latest_branch: | |
if: github.event_name == 'push' | |
needs: | |
- gui_build_and_test | |
- cli_test | |
- cli_test_release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update latest branch | |
run: | | |
./scripts/update_latest_branch.sh | |
update_latest_release: | |
if: github.event_name == 'push' | |
needs: | |
- update_latest_branch | |
runs-on: ubuntu-latest | |
steps: | |
- run: mkdir /tmp/artifacts | |
- uses: actions/download-artifact@v4 | |
with: | |
path: /tmp/artifacts | |
- run: find /tmp/artifacts | |
- name: Create latest release | |
uses: softprops/action-gh-release@v2 | |
#if: startsWith(github.ref, 'refs/tags/') | |
with: | |
fail_on_unmatched_files: true | |
prerelease: true | |
name: Latest RC | |
tag_name: latest | |
make_latest: false | |
body: A release candidate for pushing out. This has passed all automated tests and should be safe to use, but has not yet received human verification. | |
files: | | |
/tmp/artifacts/verified-gui-tar/decktricks.tar.xz | |
/tmp/artifacts/verified-gui-installer-desktop/decktricks-install.desktop | |
/tmp/artifacts/verified-gui-installer-script/decktricks-install.sh |