Skip to content

Merge pull request #65 from jixingcn/tsc #399

Merge pull request #65 from jixingcn/tsc

Merge pull request #65 from jixingcn/tsc #399

Workflow file for this run

name: Linux
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
packages: >
build-base
python3
py3-setuptools
wget
linux-headers
git
bash
clang
llvm20
ninja-build
ninja-is-really-ninja
sccache
- name: Setup env
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV
echo "SCCACHE_BUCKET=sccache" >> $GITHUB_ENV
echo "SCCACHE_ENDPOINT=http://robdangero.us:9000" >> $GITHUB_ENV
echo "SCCACHE_REGION=auto" >> $GITHUB_ENV
- name: Build in Alpine chroot
env:
CC: "sccache clang"
CXX: "sccache clang++"
LD: ld.lld
AR: llvm-ar
run: |
export CFLAGS="$CFLAGS -w"
export CXXFLAGS="$CXXFLAGS -w"
cd /home/runner/work/kmake/kmake
./configure --openssl-no-asm --without-intl --fully-static --use_clang --ninja
make
strip ./out/Release/node
sccache --show-stats
shell: alpine.sh --root {0}
- name: Get KoreTools_linux_x64
run: git clone https://github.com/Kode/KoreTools_linux_x64.git
- name: Copy binary
run: cp /home/runner/work/kmake/kmake/out/Release/node KoreTools_linux_x64/kmake
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "robbot2019@robdangero.us"
- name: Add binary
run: git -C KoreTools_linux_x64 add .
- name: Commit binary
id: commit
continue-on-error: true
run: git -C KoreTools_linux_x64 commit -a -m "Update kmake binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KoreTools_linux_x64 tag kmake_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KoreTools_linux_x64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_linux_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KoreTools_linux_x64 pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KoreTools_linux_x64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_linux_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
build-aarch64:
# see https://github.com/jirutka/setup-alpine/pull/22
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v2
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
arch: aarch64
apk-tools-url: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/aarch64/apk.static#!sha256!27a975638ddc95a411c9f17c63383e335da9edf6bb7de2281d950c291a11f878
packages: >
build-base
python3
py3-setuptools
wget
linux-headers
git
bash
clang
llvm20
ninja-build
ninja-is-really-ninja
sccache
- name: Setup env
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV
echo "SCCACHE_BUCKET=sccache" >> $GITHUB_ENV
echo "SCCACHE_ENDPOINT=http://robdangero.us:9000" >> $GITHUB_ENV
echo "SCCACHE_REGION=auto" >> $GITHUB_ENV
- name: Disable QEMU emulation
run: |
sudo apt-get install --no-install-recommends -y binfmt-support
sudo update-binfmts --disable qemu-arm
- name: Build in Alpine chroot
env:
CC: "sccache clang"
CXX: "sccache clang++"
LD: ld.lld
AR: llvm-ar
run: |
export CFLAGS="$CFLAGS -w"
export CXXFLAGS="$CXXFLAGS -w"
cd /home/runner/work/kmake/kmake
./configure --openssl-no-asm --without-intl --fully-static --use_clang --ninja
make
strip ./out/Release/node
sccache --show-stats
shell: alpine.sh --root {0}
- name: Get KoreTools_linux_arm64
run: git clone https://github.com/Kode/KoreTools_linux_arm64.git
- name: Copy binary
run: cp /home/runner/work/kmake/kmake/out/Release/node KoreTools_linux_arm64/kmake
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "robbot2019@robdangero.us"
- name: Commit binary
id: commit
continue-on-error: true
run: |
git -C KoreTools_linux_arm64 add .
git -C KoreTools_linux_arm64 commit -a -m "Update kmake binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KoreTools_linux_arm64 tag kmake_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KoreTools_linux_arm64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_linux_arm64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KoreTools_linux_arm64 pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KoreTools_linux_arm64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_linux_arm64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
build-armv7l:
# see https://github.com/jirutka/setup-alpine/pull/22
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v2
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
arch: armv7
apk-tools-url: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/aarch64/apk.static#!sha256!27a975638ddc95a411c9f17c63383e335da9edf6bb7de2281d950c291a11f878
packages: >
build-base
python3
py3-setuptools
wget
linux-headers
git
bash
clang
llvm20
ninja-build
ninja-is-really-ninja
sccache
- name: Setup env
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV
echo "SCCACHE_BUCKET=sccache" >> $GITHUB_ENV
echo "SCCACHE_ENDPOINT=http://robdangero.us:9000" >> $GITHUB_ENV
echo "SCCACHE_REGION=auto" >> $GITHUB_ENV
- name: Disable QEMU emulation
run: |
sudo apt-get install --no-install-recommends -y binfmt-support
sudo update-binfmts --disable qemu-arm
- name: Build in Alpine chroot
env:
CC: "sccache clang"
CXX: "sccache clang++"
LD: ld.lld
AR: llvm-ar
# Work around an openssl problem
CFLAGS: "-U__ILP32__"
CXXFLAGS: "-U__ILP32__"
run: |
export CFLAGS="$CFLAGS -w"
export CXXFLAGS="$CXXFLAGS -w"
cd /home/runner/work/kmake/kmake
./configure --openssl-no-asm --without-intl --fully-static --use_clang --ninja
make
strip ./out/Release/node
sccache --show-stats
shell: alpine.sh --root {0}
- name: Get KoreTools_linux_arm
run: git clone https://github.com/Kode/KoreTools_linux_arm.git
- name: Copy binary
run: cp /home/runner/work/kmake/kmake/out/Release/node KoreTools_linux_arm/kmake
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "robbot2019@robdangero.us"
- name: Commit binary
id: commit
continue-on-error: true
run: |
git -C KoreTools_linux_arm add .
git -C KoreTools_linux_arm commit -a -m "Update kmake binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KoreTools_linux_arm tag kmake_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KoreTools_linux_arm push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_linux_arm.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KoreTools_linux_arm pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KoreTools_linux_arm push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_linux_arm.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}