Use cbindgen included in GitHub Actions runners

Building cbindgen takes a few minutes on Windows, so avoid that by using
the version included in the GitHub Actions runner.

The version include in the runners isn't the same as what the build
expects, but hopefully the differences aren't significant.
This commit is contained in:
Oliver Hamlet
2021-02-07 18:39:17 +00:00
parent 17a3494771
commit 6e7f081bd3
2 changed files with 4 additions and 41 deletions
+4 -21
View File
@@ -9,7 +9,6 @@ on:
env:
CARGO_TERM_COLOR: always
CBINDGEN_VERSION: 0.13.2
MSVC_CONFIG: RelWithDebInfo
jobs:
@@ -40,12 +39,6 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cbindgen
run: |
wget -P "$HOME/.local/bin" https://github.com/eqrion/cbindgen/releases/download/v0.13.2/cbindgen
chmod +x "$HOME/.local/bin/cbindgen"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Get descriptive libloot version
id: get-libloot-version
shell: bash
@@ -86,7 +79,10 @@ jobs:
./libloot_tests
- name: Install packages for building docs
run: pip3 install --user -r docs/requirements.txt
shell: bash
run: |
pip3 install --user -r docs/requirements.txt
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build docs
run: sphinx-build -b html docs build/docs/html
@@ -129,22 +125,9 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cbindgen
id: cache-cbindgen
uses: actions/cache@v2
with:
path: ~/.cargo/bin/cbindgen.exe
key: ${{ runner.os }}-cbindgen-${{ env.CBINDGEN_VERSION }}
- name: Install Rust i686-pc-windows-msvc target
run: rustup target add i686-pc-windows-msvc
- name: Install cbindgen
run: |
cargo install cbindgen --version ${{ env.CBINDGEN_VERSION }}
echo "~/.cargo/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: steps.cache-cbindgen.outputs.cache-hit != 'true'
- name: Get descriptive libloot version
id: get-libloot-version
shell: bash
-20
View File
@@ -6,7 +6,6 @@ on:
env:
CARGO_TERM_COLOR: always
CBINDGEN_VERSION: 0.13.2
MSVC_CONFIG: RelWithDebInfo
jobs:
@@ -55,12 +54,6 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cbindgen
run: |
wget -P "$HOME/.local/bin" https://github.com/eqrion/cbindgen/releases/download/v0.13.2/cbindgen
chmod +x "$HOME/.local/bin/cbindgen"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Get descriptive libloot version
id: get-libloot-version
shell: bash
@@ -148,22 +141,9 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cbindgen
id: cache-cbindgen
uses: actions/cache@v2
with:
path: ~/.cargo/bin/cbindgen.exe
key: ${{ runner.os }}-cbindgen-${{ env.CBINDGEN_VERSION }}
- name: Install Rust i686-pc-windows-msvc target
run: rustup target add i686-pc-windows-msvc
- name: Install cbindgen
run: |
cargo install cbindgen --version ${{ env.CBINDGEN_VERSION }}
echo "~/.cargo/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: steps.cache-cbindgen.outputs.cache-hit != 'true'
- name: Get descriptive libloot version
id: get-libloot-version
shell: bash