Compare commits

...

8 Commits

Author SHA1 Message Date
imi415 749053df1e
Workflow: Disable spinning progress indicator. 2022-08-08 21:33:48 +08:00
imi415 29f70fe2e8
Workflow: Fixed ct_ng prefix. 2022-08-08 21:24:34 +08:00
imi415 b702b8d07c
Workflow: Fixed toolchain build config. 2022-08-08 21:20:55 +08:00
imi415 c18b139085
Workflow: fixed ct_ng build steps. 2022-08-08 21:18:28 +08:00
imi415 436610e94d
Workflow: Fixed repo. 2022-08-08 21:14:36 +08:00
imi415 b3ac0c3ced
Workflow: Fixed os typo. 2022-08-08 21:09:23 +08:00
imi415 6ef14033c8
Fixed workflow typo. 2022-08-08 21:05:12 +08:00
imi415 76b08197db
Added workflow. 2022-08-08 20:59:43 +08:00
1 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,48 @@
name: "Build baremetal toolchain"
on: ["push"]
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
with:
repository: "crosstool-ng/crosstool-ng"
path: "ct_ng"
- uses: "actions/checkout@v3"
with:
path: "meta"
- name: "ct-ng dependencies"
run: |
sudo apt-get install -y gperf help2man libtool-bin meson ninja-build
echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH
- name: "Build ct-ng"
working-directory: "ct_ng"
run: "./bootstrap && ./configure --prefix=${{ github.workspace }}/.local && make && make install"
- name: "Create build environment"
run: "mkdir build && cp meta/Crosstool-NG/defconfig build/defconfig"
- name: "Patch defconfig & configure build"
working-directory: "build"
run: |
echo CT_LOCAL_TARBALLS_DIR="${{ github.workspace }}/tarballs" >> defconfig
echo CT_PREFIX_DIR="${CT_TOP_DIR}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}" >> defconfig
echo CT_LOG_PROGRESS_BAR=n >> defconfig
ct-ng defconfig
- name: "Tarball cache management"
uses: actions/cache@v3
with:
path: "build/taballs"
key: ${{ runner.os }}-ct-ng-tarballs
- name: "Build toolchain"
working-directory: "build"
run: "ct-ng build"
- name: "Create toolchain archive"
working-directory: "build"
run: "tar -cvzf sh-unknown-elf-${{ github.sha }}.tar.gz sh-unknown-elf"
- name: "Publish artifact"
uses: "actions/upload-artifact@v3"
with:
name: "toolchain archive"
path: |
"build/sh-unknown-elf-${{ github.sha }}.tar.gz"
"build/build.log"
retention-days: 30