diff options
| author | Joshua Sing <joshua@hypera.dev> | 2023-11-08 18:07:34 +1100 |
|---|---|---|
| committer | Joshua Sing <joshua@hypera.dev> | 2023-11-09 00:25:27 +1100 |
| commit | ba296ec66011f1cc0fe86c4101fb264e2cb9f3da (patch) | |
| tree | 524f51f213528ea21ee8fcd0003572358cc47012 /.github/workflows/linux.yml | |
| parent | b16146e09b07d939cf028f7f431ef34dc013ebaf (diff) | |
| download | portable-ba296ec66011f1cc0fe86c4101fb264e2cb9f3da.tar.gz portable-ba296ec66011f1cc0fe86c4101fb264e2cb9f3da.tar.bz2 portable-ba296ec66011f1cc0fe86c4101fb264e2cb9f3da.zip | |
ci: shrink and improve Linux workflows
Add a new `linux` workflow that replaces cross_test, linux_ci,
linux_ci_asan, and linux_ci_asan_noasm.
Diffstat (limited to '.github/workflows/linux.yml')
| -rw-r--r-- | .github/workflows/linux.yml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..f9ec4da --- /dev/null +++ b/.github/workflows/linux.yml | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | # GitHub Actions workflow to run tests on Linux. | ||
| 2 | name: "Linux" | ||
| 3 | |||
| 4 | on: | ||
| 5 | push: {} | ||
| 6 | pull_request: {} | ||
| 7 | schedule: | ||
| 8 | - cron: "0 0 * * *" # At 00:00 daily. | ||
| 9 | |||
| 10 | jobs: | ||
| 11 | # Test against all supported architectures. | ||
| 12 | test: | ||
| 13 | name: "${{ matrix.os }}/${{ matrix.arch }} (${{ matrix.compiler }})" | ||
| 14 | runs-on: "${{ matrix.os }}" | ||
| 15 | permissions: | ||
| 16 | contents: read | ||
| 17 | strategy: | ||
| 18 | fail-fast: false | ||
| 19 | matrix: | ||
| 20 | os: ["ubuntu-20.04", "ubuntu-22.04"] | ||
| 21 | arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips32", "mips64"] | ||
| 22 | compiler: ["gcc"] | ||
| 23 | include: | ||
| 24 | - os: "ubuntu-20.04" | ||
| 25 | arch: "native" | ||
| 26 | compiler: "clang" | ||
| 27 | - os: "ubuntu-22.04" | ||
| 28 | arch: "native" | ||
| 29 | compiler: "clang" | ||
| 30 | steps: | ||
| 31 | - name: "Checkout repository" | ||
| 32 | uses: actions/checkout@v4 | ||
| 33 | |||
| 34 | - name: "Run tests" | ||
| 35 | run: ./scripts/test | ||
| 36 | env: | ||
| 37 | ARCH: "${{ matrix.arch }}" | ||
| 38 | CC: "${{ matrix.compiler }}" | ||
| 39 | |||
| 40 | # Test ASAN with and without ASM enabled. | ||
| 41 | test-asan: | ||
| 42 | name: "ASAN (${{ matrix.asm == 'ON' && 'asm' || 'no-asm' }})" | ||
| 43 | runs-on: "ubuntu-latest" | ||
| 44 | permissions: | ||
| 45 | contents: read | ||
| 46 | strategy: | ||
| 47 | fail-fast: false | ||
| 48 | matrix: | ||
| 49 | asm: [ON, OFF] | ||
| 50 | steps: | ||
| 51 | - name: "Checkout repository" | ||
| 52 | uses: actions/checkout@v4 | ||
| 53 | |||
| 54 | - name: "Run tests" | ||
| 55 | run: ./scripts/test | ||
| 56 | env: | ||
| 57 | ARCH: "native" | ||
| 58 | CC: "clang" | ||
| 59 | CFLAGS: "-ggdb -fsanitize=address" | ||
| 60 | LDFLAGS: "-fsanitize=address" | ||
| 61 | ENABLE_ASM: "${{ matrix.asm }}" | ||
| 62 | CTEST_OUTPUT_ON_FAILURE: 1 | ||
