Skip to content

Release 1.9.0

Release 1.9.0 #726

Workflow file for this run

name: Rust
on: [push]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
windows:
name: Build Windows ${{ matrix.config.arch }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config:
- { arch: x86_64, bits: 64, target: x86_64-pc-windows-msvc }
- { arch: i686, bits: 32, target: i686-pc-windows-msvc }
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
iwr -useb get.scoop.sh -outfile install-scoop.ps1
.\install-scoop.ps1 -RunAsAdmin
rm install-scoop.ps1
echo "$HOME\scoop\shims" >> $env:GITHUB_PATH
echo "C:\ProgramData\scoop\shims" >> $env:GITHUB_PATH
scoop install aria2
scoop install --arch ${{ matrix.config.bits }}bit llvm
echo "LIBCLANG_PATH=$HOME\scoop\apps\llvm\current\bin" >> $env:GITHUB_ENV
aria2c 'https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_windows${{ matrix.config.bits }}.tar.bz2' -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@v1
- name: Install nightly ${{ matrix.config.target }}
uses: actions-rs/toolchain@v1
with:
# we have to use this toolchain because "libclang.dll: invalid DLL (32-bit)"
toolchain: nightly-${{ matrix.config.target }}
target: ${{ matrix.config.target }}
override: true
components: rustfmt
- name: Build
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/') != true
with:
command: build
args: --target ${{ matrix.config.target }}
- name: Test
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/') != true
with:
command: test
args: --target ${{ matrix.config.target }} -- --nocapture --test-threads 1
- name: Build Release
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/')
with:
command: build
args: --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'
Get-ChildItem `
target\${{ matrix.config.target }}\release\build\classicube-cef-plugin-*\out\cef.exe `
| Move-Item -Destination '.\cef-windows-${{ matrix.config.arch }}.exe'
- name: VirusTotal Scan
uses: crazy-max/ghaction-virustotal@v2
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/')
run: |
node .github\format-release.js '${{ steps.virustotal.outputs.analysis }}' > release_body_text.txt
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
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
linux:
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 }
steps:
- uses: actions/checkout@v2
- name: Install x86_64 deps
if: matrix.config.arch == 'x86_64'
run: |
sudo apt-get -y update \
&& sudo apt-get -y install aria2 wget curl 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 \
libnss3 libasound2 libxss1 libnspr4 \
&& aria2c 'https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_linux64.tar.bz2' -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 nightly ${{ matrix.config.target }}
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.config.target }}
override: true
components: rustfmt
- name: Build
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/') != true
with:
command: build
args: --target ${{ matrix.config.target }}
- name: Test
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/') != true
env:
LD_LIBRARY_PATH: ./cef_interface/cef_binary/Release/
with:
command: test
args: --target ${{ matrix.config.target }} -- --nocapture --test-threads 1
- name: Build Release
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/')
with:
command: build
args: --target ${{ matrix.config.target }} --release
- 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' \
&& file './classicube_cef_linux_${{ matrix.config.arch }}.so' \
&& mv target/${{ matrix.config.target }}/release/build/classicube-cef-plugin-*/out/cef \
'./cef-linux-${{ matrix.config.arch }}' \
&& file './cef-linux-${{ matrix.config.arch }}'
- name: Upload Release
uses: softprops/action-gh-release@v1
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_nix:
name: Nix Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v22
- run: nix build --print-build-logs .
- uses: actions/upload-artifact@v3
with:
name: nix result
path: |
result/cef/cef
result/plugins/
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 }
- { arch: aarch64, target: aarch64-unknown-linux-gnu }
steps:
- uses: actions/checkout@v2
- name: Install armhf deps
if: matrix.config.arch == 'armhf'
run: |
docker build --pull -t cross-armhf -f .github/cross-armhf.Dockerfile . \
&& aria2c 'https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_linuxarm.tar.bz2' -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 aarch64 deps
if: matrix.config.arch == 'aarch64'
run: |
docker build --pull -t cross-aarch64 -f .github/cross-aarch64.Dockerfile . \
&& aria2c 'https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_linuxarm64.tar.bz2' -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 nightly ${{ matrix.config.target }}
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.config.target }}
override: true
components: rustfmt
- name: Build
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/') != true
with:
use-cross: true
command: build
args: --target ${{ matrix.config.target }}
- name: Build Release
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/')
with:
use-cross: true
command: build
args: --target ${{ matrix.config.target }} --release
- 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' \
&& file './classicube_cef_linux_${{ matrix.config.arch }}.so' \
&& mv target/${{ matrix.config.target }}/release/build/classicube-cef-plugin-*/out/cef \
'./cef-linux-${{ matrix.config.arch }}' \
&& file './cef-linux-${{ matrix.config.arch }}'
- name: Upload Release
uses: softprops/action-gh-release@v1
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:
name: Build MacOS ${{ matrix.config.arch }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
config:
- { arch: x86_64, bits: 64, target: x86_64-apple-darwin }
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
brew install aria2 cmake \
&& aria2c 'https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_macosx64.tar.bz2' -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 nightly ${{ matrix.config.target }}
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.config.target }}
override: true
components: rustfmt
- name: Build
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/') != true
with:
command: build
args: --target ${{ matrix.config.target }}
- name: Test
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/') != true
with:
command: test
args: --target ${{ matrix.config.target }} -- --nocapture --test-threads 1
- name: Build Release
uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/')
with:
command: build
args: --target ${{ matrix.config.target }} --release
- 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' \
&& file './classicube_cef_macos_${{ matrix.config.arch }}.dylib' \
&& mv target/${{ matrix.config.target }}/release/build/classicube-cef-plugin-*/out/cef './cef-macos-${{ matrix.config.arch }}' \
&& file './cef-macos-${{ matrix.config.arch }}'
- name: Upload Release
uses: softprops/action-gh-release@v1
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 }}