Bump the cargo-dependencies group across 1 directory with 5 updates #150
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: Build | |
on: | |
pull_request: | |
branches: [master, main] | |
push: | |
branches: [master, main] | |
tags: ["*"] | |
workflow_dispatch: | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
linux_nix: | |
uses: SpiralP/github-reusable-workflows/.github/workflows/build.yml@main | |
windows_x86: | |
name: Build Windows ${{ matrix.config.arch }} | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- arch: x86_64 | |
target: x86_64-pc-windows-msvc | |
url: https://cef-builds.spotifycdn.com/cef_binary_130.1.16%2Bg5a7e5ed%2Bchromium-130.0.6723.117_windows64.tar.bz2 | |
- arch: i686 | |
target: i686-pc-windows-msvc | |
url: https://cef-builds.spotifycdn.com/cef_binary_130.1.16%2Bg5a7e5ed%2Bchromium-130.0.6723.117_windows32.tar.bz2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch cef_binary | |
run: | | |
aria2c '${{ matrix.config.url }}' -o cef_binary.tar.bz2 --max-connection-per-server=4 | |
7z x -y 'cef_binary.tar.bz2' | |
Remove-Item 'cef_binary.tar.bz2' | |
7z x -y 'cef_binary.tar' | |
Remove-Item 'cef_binary.tar' | |
Get-ChildItem cef_binary_* | Rename-Item -NewName 'cef_binary' | |
Move-Item -Path 'cef_binary' -Destination 'cef_interface' | |
- name: setup-msbuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Install rust | |
run: | | |
rustup default stable | |
rustup component add rustfmt | |
rustup target add ${{ matrix.config.target }} | |
- name: Build | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} | |
- name: Test | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo test --target ${{ matrix.config.target }} -- --nocapture --test-threads 1 | |
- name: Build Release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} --release | |
- name: Rename files | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
Move-Item ` | |
-Path 'target\${{ matrix.config.target }}\release\classicube_cef_plugin.dll' ` | |
-Destination '.\classicube_cef_windows_${{ matrix.config.arch }}.dll' | |
Move-Item ` | |
-Path 'target\${{ matrix.config.target }}\release\classicube_cef_plugin.pdb' ` | |
-Destination 'classicube_cef_windows_${{ matrix.config.arch }}.pdb' | |
Move-Item ` | |
-Path 'target\${{ matrix.config.target }}\release\cef.exe' ` | |
-Destination '.\cef-windows-${{ matrix.config.arch }}.exe' | |
- name: VirusTotal Scan | |
uses: crazy-max/ghaction-virustotal@v4 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
id: virustotal | |
with: | |
vt_api_key: ${{ secrets.VT_API_KEY }} | |
files: | | |
classicube_cef_windows_${{ matrix.config.arch }}.dll | |
cef-windows-${{ matrix.config.arch }}.exe | |
- name: Generate Release Body Text | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.config.arch == 'x86_64' }} | |
run: | | |
node .github\format-release.js '${{ steps.virustotal.outputs.analysis }}' > release_body_text.txt | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.config.arch == 'x86_64' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body_path: release_body_text.txt | |
files: | | |
classicube_cef_windows_${{ matrix.config.arch }}.dll | |
classicube_cef_windows_${{ matrix.config.arch }}.pdb | |
cef-windows-${{ matrix.config.arch }}.exe | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.config.arch != 'x86_64' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
classicube_cef_windows_${{ matrix.config.arch }}.dll | |
classicube_cef_windows_${{ matrix.config.arch }}.pdb | |
cef-windows-${{ matrix.config.arch }}.exe | |
linux_x86: | |
name: Build Linux ${{ matrix.config.arch }} | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- arch: x86_64 | |
target: x86_64-unknown-linux-gnu | |
url: https://cef-builds.spotifycdn.com/cef_binary_130.1.16%2Bg5a7e5ed%2Bchromium-130.0.6723.117_linux64.tar.bz2 | |
- arch: i686 | |
target: i686-unknown-linux-gnu | |
# Linux x86 32-bit builds are discontinued after version 101 (details) | |
# https://cef-builds.spotifycdn.com/index.html#linux32 | |
url: https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_linux32.tar.bz2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install x86_64 deps | |
if: ${{ matrix.config.arch == 'x86_64' }} | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install aria2 rustup git gcc g++ build-essential cmake clang pkg-config \ | |
libssl-dev \ | |
libssl3t64 libglib2.0-0t64 libnss3 libnspr4 libdbus-1-3 libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 libdrm2 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libxkbcommon0 libpango-1.0-0 libcairo2 libasound2t64 libatspi2.0-0t64 | |
- name: Install i686 deps | |
if: ${{ matrix.config.arch == 'i686' }} | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt-get -y update | |
sudo apt-get -y install aria2 rustup git gcc g++ build-essential cmake clang pkg-config:i386 \ | |
gcc-multilib g++-multilib \ | |
libssl-dev:i386 \ | |
libssl3t64:i386 libglib2.0-0t64:i386 libnss3:i386 libnspr4:i386 libdbus-1-3:i386 libatk1.0-0t64:i386 libatk-bridge2.0-0t64:i386 libcups2t64:i386 libdrm2:i386 libxcomposite1:i386 libxdamage1:i386 libxfixes3:i386 libxrandr2:i386 libgbm1:i386 libxkbcommon0:i386 libpango-1.0-0:i386 libcairo2:i386 libasound2t64:i386 libatspi2.0-0t64:i386 | |
echo "PKG_CONFIG_ALLOW_CROSS=1" >> "$GITHUB_ENV" | |
- name: Fetch cef_binary | |
run: | | |
aria2c '${{ matrix.config.url }}' -o cef_binary.tar.bz2 --max-connection-per-server=4 | |
tar -xjf cef_binary.tar.bz2 | |
rm cef_binary.tar.bz2 | |
mv cef_binary_* cef_interface/cef_binary | |
- name: Install rust | |
run: | | |
rustup default stable | |
rustup component add rustfmt | |
rustup target add ${{ matrix.config.target }} | |
- name: Build | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} | |
file 'target/${{ matrix.config.target }}/debug/libclassicube_cef_plugin.so' | |
file 'target/${{ matrix.config.target }}/debug/cef' | |
- name: Test | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo test --target ${{ matrix.config.target }} -- --nocapture --test-threads 1 | |
- name: Build Release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} --release | |
file 'target/${{ matrix.config.target }}/release/libclassicube_cef_plugin.so' | |
file 'target/${{ matrix.config.target }}/release/cef' | |
- name: Rename files | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
mv 'target/${{ matrix.config.target }}/release/libclassicube_cef_plugin.so' \ | |
'./classicube_cef_linux_${{ matrix.config.arch }}.so' | |
mv 'target/${{ matrix.config.target }}/release/cef' \ | |
'./cef-linux-${{ matrix.config.arch }}' \ | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
classicube_cef_linux_${{ matrix.config.arch }}.so | |
cef-linux-${{ matrix.config.arch }} | |
linux_arm: | |
name: Build Linux ${{ matrix.config.arch }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- arch: armhf | |
target: armv7-unknown-linux-gnueabihf | |
url: https://cef-builds.spotifycdn.com/cef_binary_130.1.16%2Bg5a7e5ed%2Bchromium-130.0.6723.117_linuxarm.tar.bz2 | |
- arch: aarch64 | |
target: aarch64-unknown-linux-gnu | |
url: https://cef-builds.spotifycdn.com/cef_binary_130.1.16%2Bg5a7e5ed%2Bchromium-130.0.6723.117_linuxarm64.tar.bz2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install armhf deps | |
if: ${{ matrix.config.arch == 'armhf' }} | |
run: | | |
docker build --pull -t cross-armhf -f .github/cross-armhf.Dockerfile . | |
- name: Install aarch64 deps | |
if: ${{ matrix.config.arch == 'aarch64' }} | |
run: | | |
docker build --pull -t cross-aarch64 -f .github/cross-aarch64.Dockerfile . | |
- name: Fetch cef_binary | |
run: | | |
aria2c '${{ matrix.config.url }}' -o cef_binary.tar.bz2 --max-connection-per-server=4 | |
tar -xjf cef_binary.tar.bz2 | |
rm cef_binary.tar.bz2 | |
mv cef_binary_* cef_interface/cef_binary | |
- name: Install rust | |
run: | | |
rustup default stable | |
rustup component add rustfmt | |
rustup target add ${{ matrix.config.target }} | |
- name: Install cross | |
run: | | |
cargo install cross | |
- name: Build | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cross build --target ${{ matrix.config.target }} | |
file 'target/${{ matrix.config.target }}/debug/libclassicube_cef_plugin.so' | |
file 'target/${{ matrix.config.target }}/debug/cef' | |
- name: Test | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cross test --target ${{ matrix.config.target }} -- --nocapture --test-threads 1 | |
- name: Build Release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
cross build --target ${{ matrix.config.target }} --release | |
file 'target/${{ matrix.config.target }}/release/libclassicube_cef_plugin.so' | |
file 'target/${{ matrix.config.target }}/release/cef' | |
- name: Rename files | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
mv 'target/${{ matrix.config.target }}/release/libclassicube_cef_plugin.so' \ | |
'./classicube_cef_linux_${{ matrix.config.arch }}.so' | |
mv 'target/${{ matrix.config.target }}/release/cef' \ | |
'./cef-linux-${{ matrix.config.arch }}' | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
classicube_cef_linux_${{ matrix.config.arch }}.so | |
cef-linux-${{ matrix.config.arch }} | |
mac_x86: | |
name: Build MacOS ${{ matrix.config.arch }} | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- arch: x86_64 | |
target: x86_64-apple-darwin | |
url: https://cef-builds.spotifycdn.com/cef_binary_130.1.16%2Bg5a7e5ed%2Bchromium-130.0.6723.117_macosx64.tar.bz2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch cef_binary | |
run: | | |
aria2c '${{ matrix.config.url }}' -o cef_binary.tar.bz2 --max-connection-per-server=4 | |
tar -xjf cef_binary.tar.bz2 | |
rm cef_binary.tar.bz2 | |
mv cef_binary_* cef_interface/cef_binary | |
- name: Install rust | |
run: | | |
rustup default stable | |
rustup component add rustfmt | |
rustup target add ${{ matrix.config.target }} | |
- name: Build | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} | |
file 'target/${{ matrix.config.target }}/debug/libclassicube_cef_plugin.dylib' | |
file 'target/${{ matrix.config.target }}/debug/cef' | |
- name: Test | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo test --target ${{ matrix.config.target }} -- --nocapture --test-threads 1 | |
- name: Build Release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} --release | |
file 'target/${{ matrix.config.target }}/release/libclassicube_cef_plugin.dylib' | |
file 'target/${{ matrix.config.target }}/release/cef' | |
- name: Rename files | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
mv 'target/${{ matrix.config.target }}/release/libclassicube_cef_plugin.dylib' \ | |
'./classicube_cef_macos_${{ matrix.config.arch }}.dylib' | |
mv 'target/${{ matrix.config.target }}/release/cef' \ | |
'./cef-macos-${{ matrix.config.arch }}' | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
classicube_cef_macos_${{ matrix.config.arch }}.dylib | |
cef-macos-${{ matrix.config.arch }} |