Skip to content

Commit

Permalink
github/workflows: add more build matrix options
Browse files Browse the repository at this point in the history
Use the revamped environment variables support in the makefile
to build and test all permutations of compilers and linkers,
including the default ones on the system. Also test the embed
tool's support for mold's spare program headers feature.
  • Loading branch information
matheusmoreira committed Jun 9, 2024
1 parent cef8b33 commit 4b84ffd
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/lone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,43 @@ jobs:
fail-fast: false
matrix:
compiler:
- gcc
- clang
- name: cc
env:
CC: cc
- name: gcc
env:
CC: gcc
- name: clang
env:
CC: clang
linker:
- name: ld
env:
LD: ld
- name: lld
env:
LD: lld
- name: mold
env:
LD: mold
- name: mold+spare-segments
env:
LD: mold
LDFLAGS: -Wl,--spare-program-headers,2
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
- name: Set up pacman keys
run: pacman-key --init
- name: Update and install packages
run: pacman -Syu --noconfirm clang
run: pacman -Syu --noconfirm clang lld llvm mold
- uses: actions/checkout@v4
- name: Build
run: make CC=${{ matrix.compiler }}
run: make
env:
CC: ${{ matrix.compiler.env.CC }}
LD: ${{ matrix.linker.env.LD }}
CFLAGS: ${{ matrix.compiler.env.CFLAGS }}
LDFLAGS: ${{ matrix.linker.env.LDFLAGS }}
- name: Test
run: make test

0 comments on commit 4b84ffd

Please sign in to comment.