kornelski / pngquant

Lossy PNG compressor — pngquant command based on libimagequant library
https://pngquant.org
Other
5.25k stars 486 forks source link

Debump to 2.16.1 and update workflow #390

Closed God-damnit-all closed 2 years ago

God-damnit-all commented 3 years ago

With #389 representing a Windows-only change, I think it would be appropriate to debump the version to 2.16.1, and start using GitHub Actions to compile on a multitude of targets.

All tests complete successfully, though I didn't set up any sort of artifact publishing. I ask that you modify the workflow to include that.

God-damnit-all commented 3 years ago

Workflow output: https://github.com/ImportTaste/pngquant/actions/runs/1478354155

kornelski commented 3 years ago

I'm not sure about this.

God-damnit-all commented 3 years ago
  • Building for macOS requires code signing, and I don't want CI to have my private keys.

There's an 'encrypted secrets' system in place just for that very purpose, so the CI doesn't have to reference it in plaintext, and it even redacts it from any logs that are generated (though it does caution you not to invoke the variable within structured data like JSON or encoded Git blobs). https://docs.github.com/en/actions/security-guides/encrypted-secrets

  • Building for macOS needs fat binaries for two architectures. I'm also using OpenMP which requires non-standard compiler setup.

Don't worry, that shouldn't be a problem. I can make modifications. Should I also change it to make the features statically-linked?

  • Setting up these via YAML-based recipes sounds painful.

To be honest, I felt similarly at first, but I was surprised at how quick it started to click. It certainly helps that they're very commonly used in Rust projects, so there's a lot to baseoff of.

If the build breaks, I won't be able to SSH to the machines to investigate, so I'll need to guess and tweak things slowly and remotely. To be honest, I don't know how people not go mad maintaining YAML black boxes in closed CI environments.

Thankfully, there's a solution for that! https://github.com/nektos/act This project is powered by Docker containers, but is more user friendly than just using Docker on its own. It's really easy to set up, and I'm far from the smartest person.