Skip to content

Commit

Permalink
Combine workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
trinidude4 committed Nov 25, 2023
1 parent 1ac0cb1 commit c7d2468
Showing 1 changed file with 9 additions and 32 deletions.
41 changes: 9 additions & 32 deletions .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,54 +27,31 @@ jobs:
- name: Install feeds
run: cd $GITHUB_WORKSPACE && ./scripts/feeds install -a

- name: Install toolchain
run: |
cd $GITHUB_WORKSPACE
wget https://github.com/trinidude4/openwrt/releases/download/toolchain-latest/toolchain.tar.xz
tar -xhf toolchain.tar.xz
./scripts/ext-toolchain.sh \
--toolchain staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-12.3.0_musl_eabi \
--config mvebu/cortexa9
./scripts/ext-tools.sh --refresh
- name: Make defconfig
run: |
cd $GITHUB_WORKSPACE
mv .config-6.1 .config
echo "CONFIG_BUILD_NLS=y" >> .config
echo "CONFIG_EXTERNAL_TOOLCHAIN=y" >> .config
echo "CONFIG_EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL=y" >> .config
echo "CONFIG_LIBC_FILE_SPEC=\"./arm-openwrt-linux-muslgnueabi/lib/ld-musl-armhf.so.1 ./arm-openwrt-linux-muslgnueabi/lib/libc.so\"" >> .config
echo "CONFIG_LIBC_ROOT_DIR=\"/home/runner/work/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-12.3.0_musl_eabi\"" >> .config
echo "CONFIG_LIBGCC_FILE_SPEC=\"./arm-openwrt-linux-muslgnueabi/lib/libgcc_s.so ./arm-openwrt-linux-muslgnueabi/lib/libgcc_s.so.1\"" >> .config
echo "CONFIG_LIBGCC_ROOT_DIR=\"/home/runner/work/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-12.3.0_musl_eabi\"" >> .config
echo "CONFIG_LIBPTHREAD_FILE_SPEC=\"./lib/libpthread{-*.so,.so.*}\"" >> .config
echo "CONFIG_LIBPTHREAD_ROOT_DIR=\"/home/runner/work/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-12.3.0_musl_eabi\"" >> .config
echo "CONFIG_LIBRT_FILE_SPEC=\"./lib/librt{-*.so,.so.*}\"" >> .config
echo "CONFIG_LIBRT_ROOT_DIR=\"/home/runner/work/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-12.3.0_musl_eabi\"" >> .config
echo "CONFIG_LIBSTDCPP_FILE_SPEC=\"./arm-openwrt-linux-muslgnueabi/lib/libstdc++.so ./arm-openwrt-linux-muslgnueabi/lib/libstdc++.so.6 ./arm-openwrt-linux-muslgnueabi/lib/libstdc++.so.6.0.30 ./arm-openwrt-linux-muslgnueabi/lib/libstdc++.so.6.0.30-gdb.py\"" >> .config
echo "CONFIG_LIBSTDCPP_ROOT_DIR=\"/home/runner/work/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-12.3.0_musl_eabi\"" >> .config
echo "CONFIG_PACKAGE_libstdcpp=y" >> .config
echo "CONFIG_TARGET_NAME=\"arm-openwrt-linux-muslgnueabi\"" >> .config
echo "CONFIG_TOOLCHAIN_BIN_PATH=\"./usr/bin ./bin\"" >> .config
echo "CONFIG_TOOLCHAIN_INC_PATH=\"./usr/include ./include/fortify ./include\"" >> .config
echo "CONFIG_TOOLCHAIN_LIBC=\"musl\"" >> .config
echo "CONFIG_TOOLCHAIN_LIB_PATH=\"./usr/lib ./lib\"" >> .config
echo "CONFIG_TOOLCHAIN_PREFIX=\"arm-openwrt-linux-muslgnueabi-\"" >> .config
echo "CONFIG_TOOLCHAIN_ROOT=\"/home/runner/work/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-12.3.0_musl_eabi\"" >> .config
echo "CONFIG_USE_EXTERNAL_LIBC=y" >> .config
make defconfig
- name: Compile tools and toolchain
run: |
cd $GITHUB_WORKSPACE
make -j$(nproc) tools/compile
make -j$(nproc) toolchain/compile
- name: Compile linux
run: |
cd $GITHUB_WORKSPACE
make -j$(nproc) target/linux/compile V=sc
tar -cJf sdk.tar.xz build_dir staging_dir
- name: Upload directories
uses: actions/upload-artifact@main
with:
name: build_upload
path: |
sdk.tar.xz
- name: Upload files
uses: maggie44/actions/packages/automatic-releases@built-packages
with:
Expand Down

0 comments on commit c7d2468

Please sign in to comment.