Files
stoatchat/.github/workflows/rust.yaml
infi 8e2eacb1b0 fix: internal server error when uploading AVIF (#937)
* fix: add avif feature to dependencies

the comment should also say decode, encode uses rav1e not dav1d

Signed-off-by: infi <infi@infi.sh>

* chore: upgrade to debian 13

Signed-off-by: infi <infi@infi.sh>

* fix: revert unrelated EOF newlines

Signed-off-by: infi <infi@infi.sh>

* ci: provide dav1d

also in nix

Signed-off-by: infi <infi@infi.sh>

* chore: move feature definition to autumn Cargo.toml

Signed-off-by: infi <infi@infi.sh>

* fix: avif feature also required in revolt-files

Signed-off-by: infi <infi@infi.sh>

---------

Signed-off-by: infi <infi@infi.sh>
2026-08-24 10:56:15 -07:00

96 lines
3.0 KiB
YAML

name: Rust build, test, and generate specification
on:
push:
branches: [main]
pull_request:
concurrency:
group: rust-build-test-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Rust project
runs-on: arc-runner-set
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
# Using our own runners for now:
# - name: Free up disk space
# run: |
# sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
- name: Install dav1d
run: |
sudo apt-get update
sudo apt-get install --yes libdav1d-dev pkg-config
if ! pkg-config --atleast-version=1.3.0 dav1d; then
echo "The runner's dav1d is older than 1.3, will install build tools"
sudo apt-get install --yes meson ninja-build nasm
fi
- name: Setup Mise
uses: immich-app/devtools/actions/use-mise@cd24790a7f5f6439ac32cc94f5523cb2de8bfa8c # use-mise-action-v1.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: mise build
- run: mise docker:start
- name: Reference Test
env:
TEST_DB: REFERENCE
continue-on-error: ${{ github.ref_name == 'main' }}
run: |
mise test
- name: MongoDB Test
env:
TEST_DB: MONGODB
MONGODB: mongodb://localhost
continue-on-error: ${{ github.ref_name == 'main' }}
run: |
mise test
- name: Start API in background
if: github.event_name != 'pull_request' && github.ref_name == 'main'
env:
TEST_DB: REFERENCE
run: |
mise build --bin revolt-delta && (mise service:api &)
- name: Wait for API to go up
if: github.event_name != 'pull_request' && github.ref_name == 'main'
uses: nev7n/wait_for_response@7fef3c1a6e8939d0b09062f14fec50d3c5d15fa1 # v1.0.1
with:
url: "http://localhost:14702/"
- name: Checkout API repository
if: github.event_name != 'pull_request' && github.ref_name == 'main'
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: stoatchat/javascript-client-api
path: api
ssh-key: ${{ secrets.DEPLOY_KEY_JAVASCRIPT_CLIENT_API }}
- name: Download OpenAPI specification
if: github.event_name != 'pull_request' && github.ref_name == 'main'
run: curl http://localhost:14702/openapi.json -o api/OpenAPI.json
- name: Commit changes
if: github.event_name != 'pull_request' && github.ref_name == 'main'
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
cwd: "api"
add: "*.json"
author_name: Stoat CI
author_email: stoat-ci@users.noreply.github.com
message: "chore: generate OpenAPI specification"