Skip to content

Commit

Permalink
add caching layer
Browse files Browse the repository at this point in the history
  • Loading branch information
ellie-idb committed Mar 10, 2022
1 parent c55546c commit cb1f709
Showing 1 changed file with 35 additions and 15 deletions.
50 changes: 35 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- name: Set up D compiler / tools
uses: dlang-community/setup-dlang@v1.1.0
uses: dlang-community/setup-dlang@763d869b4d67e50c3ccd142108c8bca2da9df166
with:
compiler: ldc-latest
- name: Cache dub dependencies
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ~/.dub/packages
key: ubuntu-latest-build
- name: Run unittests
run: |
dub test -c asan-unittest --compiler=ldc2
Expand All @@ -31,7 +36,7 @@ jobs:
outputs:
compilers: ${{ steps.load-config.outputs.compilers }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- id: load-config
run: |
echo "::set-output name=compilers::$(cat .github/workflows/compilers.json | jq -c -M)"
Expand All @@ -49,18 +54,23 @@ jobs:
dc: ${{ fromJSON(needs.setup.outputs.compilers) }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
with:
fetch-depth: 0
- name: Setup D compiler
uses: dlang-community/setup-dlang@v1.1.1
uses: dlang-community/setup-dlang@763d869b4d67e50c3ccd142108c8bca2da9df166
with:
compiler: ${{ matrix.dc }}
- name: Test building
- name: Cache dub dependencies
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ~/.dub/packages
key: macos-latest-build
- name: Build / test
run: dub test --arch=$ARCH --build=unittest-cov
shell: bash
- name: Upload coverage data
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b

ubuntu:
name: '[ubuntu] ${{ matrix.arch }}/${{ matrix.dc }}'
Expand All @@ -76,21 +86,26 @@ jobs:
arch: [x86, x86_64]
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
with:
fetch-depth: 0
- name: Setup D compiler
uses: dlang-community/setup-dlang@v1.1.1
uses: dlang-community/setup-dlang@763d869b4d67e50c3ccd142108c8bca2da9df166
with:
compiler: ${{ matrix.dc }}
- name: Install multi-lib for 32-bit systems
if: matrix.arch == 'x86'
run: sudo apt-get update && sudo apt-get install gcc-multilib
- name: Test building
- name: Cache dub dependencies
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ~/.dub/packages
key: ubuntu-latest-build
- name: Build / test
run: dub test --arch=$ARCH --build=unittest-cov
shell: bash
- name: Upload coverage data
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b

windows:
name: '[windows] x86_64/${{ matrix.dc }}'
Expand All @@ -105,15 +120,20 @@ jobs:
dc: ${{ fromJSON(needs.setup.outputs.compilers) }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
with:
fetch-depth: 0
- name: Setup D compiler
uses: dlang-community/setup-dlang@v1.1.1
uses: dlang-community/setup-dlang@763d869b4d67e50c3ccd142108c8bca2da9df166
with:
compiler: ${{ matrix.dc }}
- name: Test building
- name: Cache dub dependencies
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ~/.dub/packages
key: windows-latest-build
- name: Build / test
run: dub test --arch=$ARCH --build=unittest-cov
shell: bash
- name: Upload coverage data
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b

0 comments on commit cb1f709

Please sign in to comment.