Skip to content

Commit

Permalink
fix github action on windows, linux and macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Anyu AY5 Wang authored and Anyu AY5 Wang committed Mar 12, 2024
1 parent 634a07e commit d19718a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ env:
CARGO_TERM_COLOR: always

jobs:
# unix-test:
# strategy:
# matrix:
# os:
# - ubuntu-latest
# - macos-latest
# runs-on: ${{matrix.os}}
unix-test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{matrix.os}}

# steps:
# - uses: actions/checkout@v3
# - uses: shogo82148/actions-setup-mysql@v1
# with:
# mysql-version: "5.7"
# root-password: "password"
# my-cnf: |
# skip-ssl
# port=3306
# - name: install diesel_cli
# run: cargo install diesel_cli --no-default-features --features mysql
# - name: init database
# run: diesel setup --database-url mysql://root:[email protected]:3306/vault
# - name: Build
# run: cargo build --verbose
# - name: Run tests
# run: cargo test --verbose
steps:
- uses: actions/checkout@v3
- uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: "5.7"
root-password: "password"
my-cnf: |
skip-ssl
port=3306
- name: install diesel_cli
run: cargo install diesel_cli --no-default-features --features mysql
- name: init database
run: diesel setup --database-url mysql://root:[email protected]:3306/vault
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose


windows-test:
Expand Down
2 changes: 1 addition & 1 deletion doc/backend/database/mysql/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Firstly, define the `MYSQLCLIENT_LIB_DIR` environment variable. The process vari

- **GitHub Actions on Windows**:
```shell
- run: echo "MYSQLCLIENT_LIB_DIR=C:\hostedtoolcache\windows\mysql\5.7.44\x64\lib\mysqlclient.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
- run: echo "MYSQLCLIENT_LIB_DIR=C:\Program Files\MySQL\MySQL Connector C 6.1\lib\vs14" | Out-File -FilePath $env:GITHUB_ENV -Append
```

> Note: If you do not only set the `mysqlclient.lib` file, it may result in duplicate library errors during compilation.
Expand Down

0 comments on commit d19718a

Please sign in to comment.