Skip to content

Commit 5d60657

Browse files
committed
Test refactors, moved tests to github workflow
1 parent 5346004 commit 5d60657

File tree

3 files changed

+73
-33
lines changed

3 files changed

+73
-33
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Dockercross Cross-Compilation Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master, v* ]
6+
pull_request:
7+
branches: [ main, master, v* ]
8+
9+
jobs:
10+
dockcross-test:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 30
13+
strategy:
14+
matrix:
15+
target: [
16+
android-arm, android-arm64, android-x86, android-x86_64,
17+
linux-i686, linux-x64, linux-x64-clang, linux-arm64,
18+
linux-arm64-musl, linux-arm64-full, linux-armv5, linux-armv5-musl,
19+
linux-armv5-uclibc, linux-m68k-uclibc, linux-s390x, linux-x64-tinycc,
20+
linux-armv6, linux-armv6-lts, linux-armv6-musl, linux-arm64-lts,
21+
linux-mipsel-lts, linux-armv7l-musl, linux-armv7, linux-armv7a,
22+
linux-armv7-lts, linux-armv7a-lts, linux-x86_64-full, linux-mips,
23+
linux-mips-uclibc, linux-mips-lts, linux-ppc64le, linux-ppc64le-lts,
24+
linux-riscv64, linux-riscv32, linux-xtensa-uclibc, web-wasi,
25+
windows-static-x86, windows-static-x64, windows-static-x64-posix,
26+
windows-armv7, windows-shared-x86, windows-shared-x64,
27+
windows-shared-x64-posix, windows-arm64
28+
]
29+
fail-fast: false
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Test ${{ matrix.target }}
39+
run: |
40+
echo "Testing dockercross target: ${{ matrix.target }}"
41+
docker run -i --rm -v "$PWD:/src" dockcross/${{ matrix.target }} bash -c 'cd /src && make clean && make'

.github/workflows/gcc-tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: GCC Version Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master, v* ]
6+
pull_request:
7+
branches: [ main, master, v* ]
8+
9+
jobs:
10+
gcc-test:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 20
13+
strategy:
14+
matrix:
15+
gcc_version: [4, 5, 8, 9, 10, 11, 12, 13]
16+
platform: [linux/amd64, linux/arm64]
17+
fail-fast: false
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Test GCC ${{ matrix.gcc_version }} on ${{ matrix.platform }}
27+
run: |
28+
echo "Testing GCC ${{ matrix.gcc_version }} on ${{ matrix.platform }}"
29+
docker run -i -v "$PWD:/src" --rm --platform ${{ matrix.platform }} gcc:${{ matrix.gcc_version }} bash -c "cd /src && make clean && make && output/eatmemory 100M -t 0"
Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Simple Test CI
1+
name: Simple Run Test
22

33
on:
44
push:
@@ -7,8 +7,7 @@ on:
77
branches: [ main, master, v* ]
88

99
jobs:
10-
# Simple multi-platform test
11-
simple-test:
10+
simple-run-test:
1211
strategy:
1312
matrix:
1413
os: [ubuntu-latest, macos-latest, windows-latest]
@@ -31,8 +30,6 @@ jobs:
3130
- name: Install dependencies (macOS)
3231
if: runner.os == 'macOS'
3332
run: |
34-
# Xcode command line tools should already be available
35-
# Just verify gcc and make are available
3633
which gcc || which clang
3734
which make
3835
@@ -58,31 +55,4 @@ jobs:
5855
- name: Run simple test (Windows)
5956
if: runner.os == 'Windows'
6057
shell: msys2 {0}
61-
run: bash test/simple.test.sh
62-
63-
# Comprehensive Docker-based tests (all cross-platform targets)
64-
docker-tests:
65-
runs-on: ubuntu-latest
66-
timeout-minutes: 120 # Docker tests can take a while
67-
68-
steps:
69-
- name: Checkout code
70-
uses: actions/checkout@v4
71-
72-
- name: Set up Docker Buildx
73-
uses: docker/setup-buildx-action@v3
74-
75-
- name: Enable Docker experimental features
76-
run: |
77-
set -e
78-
echo '{"experimental": true}' | sudo tee /etc/docker/daemon.json
79-
sudo systemctl restart docker
80-
# Verify Docker is working after restart
81-
docker --version
82-
docker info > /dev/null
83-
84-
- name: Run comprehensive test suite
85-
run: |
86-
cd test
87-
bash all.test.sh
88-
58+
run: bash test/simple.test.sh

0 commit comments

Comments
 (0)