Skip to content

Commit e923868

Browse files
committed
ci: linux deps
1 parent ec39ae8 commit e923868

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

.github/workflows/build.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,60 @@ jobs:
6868
[ "${{ inputs.target_os }}" != "${{ inputs.target_cpu }}" ] && ARTIFACT="$ARTIFACT-${{ inputs.target_cpu }}"
6969
[ "${{ inputs.is_debug }}" == "true" ] && ARTIFACT="$ARTIFACT-debug"
7070
echo "artifact=$ARTIFACT" >> $GITHUB_OUTPUT
71+
7172
- name: Checkout this repo
7273
uses: actions/checkout@v4
73-
- name: Install Tools
74+
75+
- name: Install Linux dependencies
76+
if: ${{ inputs.target_os == 'linux' }}
77+
run: |
78+
PKGS=""
79+
80+
if [ "${{ inputs.target_environment }}" == "musl" ]; then
81+
case "${{ inputs.target_cpu }}" in
82+
x86)
83+
PKGS="g++ g++-multilib"
84+
;;
85+
86+
x64)
87+
PKGS="g++"
88+
;;
89+
90+
arm)
91+
PKGS="g++"
92+
;;
93+
94+
arm64)
95+
PKGS="g++"
96+
;;
97+
esac
98+
else
99+
case "${{ inputs.target_cpu }}" in
100+
arm)
101+
PKGS="libc6-i386 gcc-multilib g++-arm-linux-gnueabihf gcc-arm-linux-gnueabihf"
102+
;;
103+
104+
arm64)
105+
PKGS="libc6-i386 gcc-multilib g++-aarch64-linux-gnu gcc-aarch64-linux-gnu"
106+
;;
107+
108+
x86)
109+
PKGS="g++-multilib"
110+
;;
111+
112+
x64)
113+
PKGS="g++"
114+
;;
115+
esac
116+
fi
117+
118+
apt-get update
119+
apt-get install -y cmake pkg-config
120+
apt-get install -y $PKGS
121+
122+
- name: Install Just
74123
uses: extractions/setup-just@v2
124+
75125
- name: Set environment variables
76126
shell: bash
77127
run: |

0 commit comments

Comments
 (0)