Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated github actions. #424

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 35 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Test on Push

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
on:
push:
branches:
- main
Expand All @@ -14,41 +13,47 @@ jobs:
test_Ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: dependencies
run: |
sudo apt-get update
sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
- name: Test
run: |
cargo test
cargo test --features flatpak
- uses: actions/checkout@v4
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: dependencies
run: |
sudo apt-get update
sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Test
run: |
cargo test
cargo test --features flatpak
test_Windows:
runs-on: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust Cache
id: rust_cache
uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Rust Cache
id: rust_cache
uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test
# test_Macos:
# runs-on: macos-latest
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install latest stable
# uses: actions-rs/toolchain@v1
# - uses: actions/checkout@v4
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: stable
# components: clippy
# - name: Rust Cache
# id: rust_cache
# uses: Swatinem/rust-cache@v2
# uses: Swatinem/rust-cache@v2
# - name: Test
# run: cargo test

26 changes: 17 additions & 9 deletions .github/workflows/release_on_v_tag.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/
name: Create Release Builds

on:
push:
tags:
- "v.*.*.*" # matches v.1.0.1 etc

jobs:
once:
name: Create GitHub release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create a release
id: create_release
uses: actions/create-release@v1
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -36,26 +44,26 @@ jobs:
- os: windows-latest
file: target/release/boilr.exe
asset_name: windows_BoilR.exe
strip: false
strip: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
sudo apt-get update
sudo apt-get update
sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev binutils
- name: Rust Cache
id: rust_cache
uses: Swatinem/rust-cache@v2
- name: Build Release Version
run: cargo build --release
run: cargo build --release
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.once.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ matrix.file }}
asset_name: ${{ matrix.asset_name }}
asset_content_type: application/octet-stream
artifact_path: ${{ github.workspace }}/${{ matrix.file }}
artifact_name: ${{ matrix.asset_name }}
artifact_content_type: application/octet-stream
32 changes: 11 additions & 21 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/

name: rust-clippy analyze

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '16 19 * * 6'
Expand All @@ -25,31 +18,28 @@ jobs:
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
actions: read

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: clippy
override: true

- name: Install required cargo
- name: Install required cargo tools
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
run:
cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
run: |
cargo clippy --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true