Skip to content

Bump the cargo-dependencies group with 3 updates #94

Bump the cargo-dependencies group with 3 updates

Bump the cargo-dependencies group with 3 updates #94

Workflow file for this run

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_127.1.4%2Bge71a509%2Bchromium-127.0.6533.89_windows64.tar.bz2
- arch: i686
target: i686-pc-windows-msvc
url: https://cef-builds.spotifycdn.com/cef_binary_127.1.4%2Bge71a509%2Bchromium-127.0.6533.89_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-latest
strategy:
fail-fast: false
matrix:
config:
- arch: x86_64
target: x86_64-unknown-linux-gnu
url: https://cef-builds.spotifycdn.com/cef_binary_127.1.4%2Bge71a509%2Bchromium-127.0.6533.89_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 git gcc g++ build-essential cmake clang pkg-config \
libssl-dev libglib2.0-dev libpango1.0-dev libatk1.0-dev libgtk-3-dev libgdk-pixbuf2.0-dev \
libssl3 libnss3 libasound2 libxss1 libnspr4
- 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 git gcc g++ build-essential cmake clang pkg-config:i386 \
gcc-multilib g++-multilib \
libssl-dev:i386 libglib2.0-dev:i386 libpango1.0-dev:i386 libatk1.0-dev:i386 libgtk-3-dev:i386 libgdk-pixbuf2.0-dev:i386 \
libssl3:i386 libnss3:i386 libasound2:i386 libxss1:i386 libnspr4: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_127.1.4%2Bge71a509%2Bchromium-127.0.6533.89_linuxarm.tar.bz2
- arch: aarch64
target: aarch64-unknown-linux-gnu
url: https://cef-builds.spotifycdn.com/cef_binary_127.1.4%2Bge71a509%2Bchromium-127.0.6533.89_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_127.1.4%2Bge71a509%2Bchromium-127.0.6533.89_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 }}