Skip to content

Commit

Permalink
Merge pull request #94 from abusch/update-ci
Browse files Browse the repository at this point in the history
Update ci.yml
  • Loading branch information
abusch authored Sep 17, 2023
2 parents 1cc1ea3 + 80722a8 commit b95abf9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 51 deletions.
26 changes: 3 additions & 23 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,39 +49,19 @@ jobs:
features: ''
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.target }}
profile: minimal
# - name: Install macOS dependencies
# if: matrix.os == 'macos-latest'
# run: brew install portaudio pkg-config
- name: Set up cross compilation
if: matrix.cross_arch
run: |
dpkg --add-architecture ${{ matrix.cross_arch }}
echo "PKG_CONFIG_PATH=${{ matrix.pkg_config_path }}" >> $GITHUB_ENV
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
# - name: Install Linux dependencies
# if: startsWith(matrix.build_target, 'linux-')
# run: |
# apt update
# apt install -y ${{ matrix.dependencies }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout src
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Running cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --locked --release --target ${{ matrix.target }} ${{ matrix.features }}
run: cargo build --locked --release --target ${{ matrix.target }} ${{ matrix.features }}
- name: Extract git tag
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
Expand Down
40 changes: 12 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

jobs:
check-macos:
check:
name: Checking ${{ matrix.build_target }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -31,37 +31,21 @@ jobs:
features: ''
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.target }}
profile: minimal
# - name: Install macOS dependencies
# if: matrix.os == 'macos-latest'
# run: brew install portaudio pkg-config
# - name: Install Linux dependencies
# if: matrix.os == 'ubuntu-latest'
# run: |
# sudo apt update
# sudo apt install libpulse-dev libdbus-1-dev libncursesw5-dev libxcb-shape0-dev libxcb-xfixes0-dev
- uses: actions/checkout@v2
name: Checkout src
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Checkout src
uses: actions/checkout@v4
- name: Running cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --locked --release --target ${{ matrix.target }} ${{ matrix.features }}
run: cargo check --locked --release --target ${{ matrix.target }} ${{ matrix.features }}

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cargo fmt
run: cargo fmt --all -- --check
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt check
uses: actions-rust-lang/rustfmt@v1

0 comments on commit b95abf9

Please sign in to comment.