Skip to content

Commit

Permalink
Update CI runner (tlspuffin#234)
Browse files Browse the repository at this point in the history
* ci: update CI runner to ubuntu 22.04

* ci: fix inconsistent bindgen invocations between systems

  By default, bindgen will use the libclang version with the highest version.
  This doesn't necessarily match clang's version. In CI's ubuntu-22.04, the
  default clang is 14.x and the highest available version of libclang is 15.x.

  We now force bindgen to use the matching pair by setting the CLANG_PATH and
  LIBCLANG_PATH environment variables in the CI setup action.

* ci: set consistent env variables across all workflows

  We now set rust environment variables during the setup action running at the
  beginning of each workflow. This should ensure a consistent environment
  between the different workflows and allow more cache reuse in the future.

---------

Co-authored-by: Michael Mera <[email protected]>
  • Loading branch information
maxammann and michaelmera authored Mar 7, 2024
1 parent c98e986 commit 51da832
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
16 changes: 16 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ inputs:
runs:
using: "composite"
steps:
- name: setup CI env
shell: bash
run: |
#!/usr/bin/env bash
export_env() {
local var=${1}
local val=${2:-${!1}}
printf '%s=%s\n' "${var}" "${val}" >> "${GITHUB_ENV}"
}
export_env RUST_LOG "info"
export_env CLANG_PATH "$(clang -print-prog-name=clang)"
export_env LIBCLANG_PATH "$(llvm-config-"$(clang -dumpversion | cut -d '.' -f1)" --libdir)"
export_env BINDGEN_EXTRA_CLANG_ARGS "-v"
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
build-docs:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
needs: build-docs
if: inputs.deploy
name: Deploy
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Download api-docs
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ on:
required: false
type: string

env:
RUST_LOG: info

jobs:
build-linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Build "${{ inputs.name }}"
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
run-benchmarks:
name: Benchmark
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
run-checks:
name: Check
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down

0 comments on commit 51da832

Please sign in to comment.