Skip to content

Commit cd89833

Browse files
committed
ci: Test crossdev in GitHub Actions
Add a workflow which sets up and tests crossdev for the given list of targets.
1 parent fed508a commit cd89833

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/crossdev.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'feature/**'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'feature/**'
12+
schedule:
13+
- cron: 00 4 * * *
14+
15+
jobs:
16+
crossdev:
17+
strategy:
18+
matrix:
19+
include:
20+
# `target` is the cross target.
21+
# `stage3` is the host stage3.
22+
- target: aarch64-unknown-linux-musl
23+
stage3: musl-llvm
24+
args: --llvm
25+
name: crossdev target=${{ matrix.target }} stage3=${{ matrix.stage3 }}
26+
runs-on: ubuntu-latest
27+
container: docker.io/gentoo/stage3:${{ matrix.stage3 }}
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install dependencies
32+
run: |
33+
# FIXME: Uncomment
34+
# emerge --sync --quiet
35+
emerge \
36+
app-eselect/eselect-repository \
37+
sys-apps/config-site
38+
39+
# FIXME: Remove this step once necessary changes are merged.
40+
- name: Use patched overlay
41+
run: |
42+
curl -L \
43+
https://github.com/vadorovsky/gentoo/archive/refs/heads/cross-llvm.tar.gz | \
44+
tar -xz
45+
46+
- name: Install crossdev
47+
run: make install
48+
49+
- name: Create cross environment
50+
run: crossdev ${{ matrix.args }} --target ${{ matrix.target }}
51+
52+
# zstd and its dependencies need both C and C++ toolchain. If any of them
53+
# is broken, the installation will fail.
54+
- name: Sanity check
55+
run: ${{ matrix.target }}-emerge app-arch/zstd

0 commit comments

Comments
 (0)