Skip to content

Commit

Permalink
Fix CI macOS and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreal2000 committed Apr 22, 2024
1 parent ed76f39 commit 7bbd25e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
Expand All @@ -17,6 +18,7 @@ on:
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -58,7 +60,9 @@ jobs:
path: td/
key: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
- name: Extract TDLib
run: cp -r ./td/tdlib ./
run: |
cp -r ./td/tdlib ./
sudo cp ./tdlib/lib/libtdjson.so.* /usr/lib/
- name: Set environment variables
run: echo "PKG_CONFIG_PATH=$(pwd)/tdlib/lib/pkgconfig" >> $GITHUB_ENV
- name: Install Rust nightly
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
Expand All @@ -17,6 +18,7 @@ on:
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -57,7 +59,9 @@ jobs:
path: td/
key: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
- name: Extract TDLib
run: cp -r ./td/tdlib ./
run: |
cp -r ./td/tdlib ./
cp ./tdlib/lib/libtdjson.*.dylib /usr/local/lib/
- name: Set environment variables
run: |
echo "PKG_CONFIG_PATH=$(pwd)/tdlib/lib/pkgconfig" >> $GITHUB_ENV
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
Expand All @@ -17,6 +18,7 @@ on:
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'

env:
CARGO_TERM_COLOR: always
Expand Down
19 changes: 7 additions & 12 deletions docs/configuration/contributors/CONFIGURE_TDLIB.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ Step 4 (not always necessary):

**!The version of the library may change!**

After `cargo build`, if it fails, you may need to move explicitly the `libtdjson.1.8.25.dylib` to the `/usr/local/lib`, `/usr/lib` or `/Users/NAME/lib`:
After `cargo build`, if it fails, you may need to move explicitly the `libtdjson.1.8.19.dylib` to the `/usr/local/lib`, `/usr/lib`:

```bash
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib '/Users/NAME/lib/'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib'/usr/local/lib/'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib '/usr/lib/libtd'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.19.dylib '/usr/local/lib/'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.19.dylib '/usr/lib/'
```

### Windows
Expand Down Expand Up @@ -170,12 +169,10 @@ Step 4 (not always necessary):

**!The version of the library may change!**

After `cargo build`, if it fails, you may need to move explicitly the `libtdjson.1.8.25.dylib` to the `/usr/local/lib`, `/usr/lib` or `/Users/NAME/lib`:
After `cargo build`, if it fails, you may need to move explicitly the `libtdjson.so.1.8.19` to the `/usr/lib`:

```bash
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib '/Users/NAME/lib/'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib'/usr/local/lib/'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib '/usr/lib/libtd'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.so.1.8.19 '/usr/lib/'
```

### Linux Other (using clang)
Expand Down Expand Up @@ -231,10 +228,8 @@ Step 4 (not always necessary):

**!The version of the library may change!**

After `cargo build`, if it fails, you may need to move explicitly the `libtdjson.1.8.25.dylib` to the `/usr/local/lib`, `/usr/lib` or `/Users/NAME/lib`:
After `cargo build`, if it fails, you may need to move explicitly the `libtdjson.so.1.8.19` to the `/usr/lib`:

```bash
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib '/Users/NAME/lib/'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib'/usr/local/lib/'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.1.8.25.dylib '/usr/lib/libtd'
cp ~/WHERE_IS_TDLIB/tdlib/lib/libtdjson.so.1.8.19 '/usr/lib/'
```

0 comments on commit 7bbd25e

Please sign in to comment.