Bump the cargo-dependencies group with 2 updates #43
Workflow file for this run
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] | |
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: | |
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@v4 | |
- 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 | |
Move-Item ` | |
-Path 'target\${{ matrix.config.target }}\debug\classicube_chatsounds_plugin.dll' ` | |
-Destination '.\classicube_chatsounds_windows_${{ matrix.config.arch }}.dll' | |
- name: Build Release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} --release | |
Move-Item ` | |
-Path 'target\${{ matrix.config.target }}\release\classicube_chatsounds_plugin.dll' ` | |
-Destination '.\classicube_chatsounds_windows_${{ matrix.config.arch }}.dll' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: classicube_chatsounds_windows_${{ matrix.config.arch }} | |
path: classicube_chatsounds_windows_${{ matrix.config.arch }}.dll | |
- 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_chatsounds_windows_${{ matrix.config.arch }}.dll | |
- 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@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body_path: release_body_text.txt | |
files: | | |
classicube_chatsounds_windows_${{ matrix.config.arch }}.dll | |
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 } | |
# - { arch: i686, target: i686-unknown-linux-gnu } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install deps | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install clang llvm | |
sudo apt-get -y install mesa-common-dev libopenal-dev libcurl4-openssl-dev libgl1-mesa-dev | |
sudo apt-get -y install libasound2-dev libpango1.0-dev libatk1.0-dev libgtk-3-dev libssl-dev openssl | |
- 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_chatsounds_plugin.so' | |
- name: Test | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo test --target ${{ matrix.config.target }} -- --nocapture --test-threads 1 | |
mv 'target/${{ matrix.config.target }}/debug/libclassicube_chatsounds_plugin.so' \ | |
'./classicube_chatsounds_linux_${{ matrix.config.arch }}.so' | |
- name: Build Release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} --release | |
file 'target/${{ matrix.config.target }}/release/libclassicube_chatsounds_plugin.so' | |
mv 'target/${{ matrix.config.target }}/release/libclassicube_chatsounds_plugin.so' \ | |
'./classicube_chatsounds_linux_${{ matrix.config.arch }}.so' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: classicube_chatsounds_linux_${{ matrix.config.arch }} | |
path: classicube_chatsounds_linux_${{ matrix.config.arch }}.so | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
classicube_chatsounds_linux_${{ matrix.config.arch }}.so | |
mac: | |
name: Build MacOS ${{ matrix.config.arch }} | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { arch: x86_64, target: x86_64-apple-darwin } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install deps | |
run: | | |
brew install llvm | |
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH | |
- 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_chatsounds_plugin.dylib' | |
- name: Test | |
if: ${{ startsWith(github.ref, 'refs/tags/') != true }} | |
run: | | |
cargo test --target ${{ matrix.config.target }} -- --nocapture --test-threads 1 | |
mv 'target/${{ matrix.config.target }}/debug/libclassicube_chatsounds_plugin.dylib' \ | |
'./classicube_chatsounds_macos_${{ matrix.config.arch }}.dylib' | |
- name: Build Release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
cargo build --target ${{ matrix.config.target }} --release | |
file 'target/${{ matrix.config.target }}/release/libclassicube_chatsounds_plugin.dylib' | |
mv 'target/${{ matrix.config.target }}/release/libclassicube_chatsounds_plugin.dylib' \ | |
'./classicube_chatsounds_macos_${{ matrix.config.arch }}.dylib' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: classicube_chatsounds_macos_${{ matrix.config.arch }} | |
path: classicube_chatsounds_macos_${{ matrix.config.arch }}.dylib | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
with: | |
files: target/release/classicube_chatsounds_macos_amd64.dylib | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
classicube_chatsounds_macos_${{ matrix.config.arch }}.dylib |