Commit Graph

90 Commits

Author SHA1 Message Date
Adrian Wielgosik d7e8df517f Revert "ci: Don't use specific Swatinem/rust-cache revision"
This reverts commit 5db1f46a3a.
2022-12-02 16:35:52 -07:00
Daniel Jacobs 5db1f46a3a ci: Don't use specific Swatinem/rust-cache revision 2022-12-02 11:36:52 +01:00
Daniel Jacobs 872dee65e7 ci: Move to direct cargo commands instead of using actions-rs/cargo 2022-12-02 11:36:52 +01:00
Daniel Jacobs 136c05fb17 ci: Replace actions-rs/toolchain with dtolnay/rust-toolchain 2022-12-02 11:36:52 +01:00
Daniel Jacobs eae04a1884 ci: Upgrade Node 12 actions workflows 2022-12-02 11:36:52 +01:00
EmperorBale dd2bc1ea78
avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
Aaron Hill 3417dceca2 ci: Cache Cargo output on Github Actions
Co-authored-by: Mike Welsh <mwelsh@gmail.com>
2022-08-30 00:53:33 -07:00
Aaron Hill b5391c00f6 tests: Re-add per-platform image tests
Reverts #7267

The image tests for the upcoming 'DisplayObject.stageRect' support
differ between Linux and Windows, so we need this support again.

To avoid the Linux filename churn that we previously encountered,
we now only include the platform and graphics backend in the filename
(e.g. `expected-linux-Vulkan`). This may result in some unexpected
'mismatched image' test failures if GHA updates to a version of Lavapipe
that changes rendering output, but this should be relatively easy to
notice.
2022-08-24 21:29:53 -07:00
Aaron Hill 86e6983943 avm2: Partially implement Loader.load
This PR implements the `Loader.load` method, as well as
the associated `LoaderInfo` properties and events.

We can now load in an external AVM2 SWf: it will be added
as a child of `Loader` object, and will render properly
to the screen.

Limitations:
* The only supported `URLRequest` property is `url`
* `LoaderContext` is not supported at all - we always use the default
  behavior
* Only `Loader.load` is implemented - we do not yet support unloading.
* We fire a plain 'Event' for the 'progress' event, instead of using
  the (not yet implemented) 'ProgressEvent' class

The main changes in this PR are:
* The AVM2 `Loader` class now has an associated display object,
  `LoaderDisplay`. This is basically a stub, and just renders
  its single child (if it exists).
* `LoaderStream::Stage` is renamed to `LoaderStream::NotYetLoaded`.
  This is used for both the `Stage` and an 'uninitialized'
  `Loader.contentLoaderInfo`. In both cases, certain properties throw
  errors, while others return actual values.
* The rust `Loader` manager now handles both AVM1 and AVM2 movie loads.
2022-08-22 19:36:29 -07:00
Aaron Hill f7205a02a9 render: Add BlendMode infrastructure and implement BlendMode.ADD
Each render backend keeps track of a stack of BlenModes,
which are pushed and popped by 'core' as we render objects
in the displaay tree. For now, I've just implemented BlendMode.ADD,
which maps directly onto blend mode supported by each backend.

All other blend modes (besides 'NORMAL') will produce a warning
when we try to render using them. This may produce a very large amount
of log output, but it's simpler than emitting each warning only once,
and will help to point developers in the right direction when they
get otherwise inexplicable rendering issues (due to a blend mode
not being implemented).

The wgpu implementation is by far the most complicated, as we need
to construct a `RenderPipeline` for each possible
`(BlendMode, MaskState)`. I haven't been able to find any documentation
about the maximum supported number of (simultaneous) WebGPU render
pipelines - if this becomes an issue, we may need to register them
on-demand when a particular blend mode is requested.
2022-08-18 16:38:17 -07:00
TÖRÖK Attila b9d2ef4ab5 ci: Explicitly use ubuntu-22.04 image for all CI workflows
Because GitHub is really slow in moving the ubuntu-latest alias over
to 22.04, and it's starting to cause issues with the desktop build.
2022-08-17 11:10:10 -07:00
relrelb 98c0cab6aa ci: Check documentation
In order to prevent future warnings on malformed documentation comments.
2022-08-10 09:20:53 +03:00
relrelb 4021cb54a4 ci: Run cargo in locked mode
Per https://doc.rust-lang.org/cargo/commands/cargo-test.html#manifest-options,
`cargo --locked` assumes that `Cargo.lock` is up-to-date, and otherwise
exits with an error.
Besides the nice validation, this might hopefully speed-up CI a bit.

This could be done on Web as well, but I'm not sure what's the best
way of doing it.
2022-05-17 12:47:50 -07:00
Mike Welsh 99d8a5bff3 ci: Run clippy with all features 2022-04-11 20:15:13 -07:00
Daniel Jacobs 31446785f9 ci: Use windows-latest again 2022-03-03 16:55:13 -07:00
Chris Midgley b2af0667fb build: add libgtk-3-dev 2022-02-23 22:45:26 +02:00
relrelb 4037707ce5 ci: Migrate to Windows Server 2022
Per https://github.com/actions/virtual-environments/issues/4856,
`windows-latest` will default to `windows-2022` soon (not later than
March, 6). Since it seems like we still run on `windows-2019`, force the
migration by specifying `windows-2022` explicitly.

Since https://github.com/actions/virtual-environments/pull/5050 is
merged, this should fix the failing Web tests on mismatched Chrome and
chromedriver versions.

TODO: Once `windows-latest` defaults to `windows-2022` (again, March, 6),
change back to `windows-latest`.
2022-02-16 22:11:35 -07:00
relrelb 1fd1a1e68e ci: Use `runner.os` over `matrix.os`
`runner.os` is a little more descriptive. But unfortunately, it cannot
be used in `job.name`.
2022-01-29 14:19:51 -08:00
Mike Welsh 95ddc06e71 ci: Use macos-11 runner 2022-01-21 18:21:33 -08:00
Chris Midgley 7f09e751a1
dev: have required builds 'run' (#5332)
* dev: have required builds 'run'

* dev: remove unnecessary fields

* dev: do less in the no-op step
2021-09-21 21:01:51 +02:00
Chris Midgley d34d8457ea dev: Only test beta rust on ubuntu 2021-09-06 17:35:03 +02:00
relrelb 915204b998 ci: Checkout source before paths filter
Otherwise the paths filter fails to list files using git.
2021-08-26 01:07:17 +03:00
relrelb 2ff9d93c90 ci: Cleanup quotes
Prefer single quotes over double quotes, and omit them where possible.
2021-08-26 01:07:17 +03:00
relrelb 7483afa4a9 ci: Inline `img_tests` boolean
Simplifies the logic, makes it shorter more readable.
2021-08-26 01:07:17 +03:00
relrelb bf32a0096b ci: Formatting 2021-08-26 01:07:17 +03:00
relrelb db247f5a1a ci: Use `dorny/paths-filter` to run only if certain file paths change
The previous approach of `paths-ignore` was flawed because currently
it doesn't interact well with GitHub's "Require status checks to pass
before merging" setting. As a result, PRs that didn't trigger all
workflows couldn't be merged, because GitHub waited for the skipped
workflows to finish.

`dorny/paths-filter` is a somewhat elegant workaround proposed in
https://stackoverflow.com/questions/66751567.
2021-08-25 23:59:47 +03:00
Adrian Wielgosik cc557fd6e7 Revert "dev: run workflows only if certain file paths change (#5103)"
This reverts commit 60cf947334.
2021-08-25 21:26:39 +02:00
Chris Midgley 60cf947334
dev: run workflows only if certain file paths change (#5103)
* dev: run workflows only if certain file paths change

* fix: looks like you can't ? a /

* feat: simpler approach

Don't run Rust if only package.json, package-lock.json or anything under
web/packages has changed.

Don't run either if they only have docs changes.
2021-08-23 22:19:22 +02:00
TÖRÖK Attila 708c274069 github: Set a dummy value for $XDG_RUNTIME_DIR to silence some warnings 2021-08-23 22:15:32 +02:00
Adrian Wielgosik 2f07363aa7 dev: Only test nightly rustc on linux 2021-08-22 13:29:14 +02:00
Adrian Wielgosik 8c8be7804d dev: Make beta builds non-required 2021-08-22 00:08:29 +02:00
Chris Midgley 9fd4f097f8 dev: check formatting before running tests 2021-08-21 14:58:10 +02:00
Chris Midgley d7da19bffa fix: remove the version requirement for mesa drivers 2021-07-31 11:17:19 +03:00
Mike Welsh 8a2298bd8f chore: Bump mesa-vulkan-drivers version 2021-07-22 00:30:18 -07:00
Aaron Hill 068e06e40f Add support for image comparison tests 2021-07-21 21:48:24 -07:00
Mike Welsh 66b144e49b ci: Run apt-get update
GitHub Actions runners updated to Ubuntu 20.04, so run apt-get
update to ensure we can install our Linux dependencies (namely
libasound2).
2021-05-07 20:05:17 -07:00
relrelb 6d2ad4e607
chore: Cleanup actions 2021-01-31 19:07:36 -08:00
Luca Weiss d5cb396331 *: fix spelling mistakes 2020-09-19 16:17:58 -07:00
CUB3D 22d64aabd5 chore: Fix failing tests
Add missing libraries for X11 clipboard access
2020-06-09 22:41:11 +01:00
Nathan Adams ec6363813c chore: Split CI into "rust" and "web" tests to speed up time 2020-05-19 11:42:57 +02:00