Skip to content

Commit

Permalink
fix cargo install by stop using archived actions
Browse files Browse the repository at this point in the history
  • Loading branch information
naokiri committed Sep 23, 2024
1 parent e3b53aa commit 88439a8
Showing 1 changed file with 14 additions and 34 deletions.
48 changes: 14 additions & 34 deletions .github/workflows/continuous_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
rustflags: ""
override: true
- name: Format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
run: cargo fmt -- --check
- name: Lint check
uses: actions-rs/clippy-check@v1
uses: giraffate/clippy-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings -A dead_code -A improper_ctypes_definitions
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: -- -D warnings -A dead_code -A improper_ctypes_definitions
rust_test:
name: cargo test
strategy:
Expand All @@ -57,16 +54,13 @@ jobs:
- name: Install required libs (Ubuntu)
run: sudo apt-get install libxkbcommon-dev
- name: Install cargo
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.channel }}
profile: minimal
rustflags: ""
override: true
- name: Run rust test
uses: actions-rs/cargo@v1
with:
command: test
args: --features capi
run: cargo test --features capi -A dead_code
library_test:
name: library test
strategy:
Expand All @@ -85,9 +79,10 @@ jobs:
echo Version: ${{ steps.versions.outputs.version }}
echo MajorVersion: ${{ steps.versions.outputs.major-version }}
- name: Install cargo
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
rustflags: ""
override: true
- uses: actions/cache@v3
with:
Expand All @@ -106,22 +101,14 @@ jobs:
continue-on-error: true
- name: Install cbindgen
if: ${{ always() && steps.cbindgenCheck.outcome == 'failure' }}
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: install
args: cbindgen
run: cargo +stable install cbindgen
- name: cargo-c-exists
id: cargoCCheck
run: test -e ~/.cargo/bin/cargo-cbuild
continue-on-error: true
- name: Install cargo-c
if: ${{ always() && steps.cargoCCheck.outcome == 'failure' }}
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: install
args: cargo-c --version 0.9.12
run: cargo +stable install cargo-c --version 0.9.12
- name: Install required libs (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libxkbcommon-dev
Expand All @@ -132,14 +119,7 @@ jobs:
brew install libxkbcommon
echo `brew --prefix`
- name: Build library
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: cbuild
# - name: Install library
# uses: actions-rs/cargo@v1
# with:
# command: cargo cinstall --prefix=/tmp --datadir=~/.local/share
run: cargo +stable cbuild
- name: copy shared data
run: mkdir -p ~/.local/share/libcskk && cp -r ./assets/* ~/.local/share/libcskk
# TODO: Use variable in github actions? Only target directory is different here.
Expand Down

0 comments on commit 88439a8

Please sign in to comment.