actions: compile kpf-test.linux #325
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build KPF & Pongo | |
on: | |
# Trigger on all pushes and pull requests | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Update repository | |
run: | | |
git submodule update --init --recursive | |
git fetch --all | |
git reset --hard origin/$(git branch --show-current) | |
git submodule update --recursive --remote | |
- name: Compile KPF and Pongo | |
run: | | |
make | |
- name: Prepare upload directory | |
run: | | |
mkdir upload | |
mv build/Pongo.bin upload/ | |
mv build/checkra1n-kpf-pongo upload/ | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v7 | |
- name: Upload artifact | |
uses: wangyucode/[email protected] | |
with: | |
host: ${{ secrets.NICKCHAN_FTP_HOST }} | |
port: ${{ secrets.NICKCHAN_FTP_PORT }} | |
username: palera1n | |
password: ${{ secrets.NICKCHAN_FTP_PASS }} | |
forceUpload: true | |
dryRun: false | |
localDir: 'upload' | |
remoteDir: "/palera1n/artifacts/kpf/${{ steps.branch-name.outputs.ref_branch || github.ref }}" | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install packages | |
run: | | |
sudo dpkg --add-architecture arm64 | |
sudo sed -i 's/deb /deb [arch=amd64] /g' /etc/apt/sources.list | |
mkdir -p /etc/apt/sources.list.d | |
echo "deb [arch=arm64] http://ports.ubuntu.com jammy main multiverse" | sudo tee /etc/apt/sources.list.d/arm64.list | |
sudo apt update | |
sudo apt -y --allow-downgrades dist-upgrade | |
sudo apt install -y libc6:arm64 gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross qemu-user qemu-user-binfmt clang lld | |
- name: Compile KPF test | |
run: | |
make -C checkra1n/kpf-test KPF_CFLAGS="-target aarch64-linux-gnu -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -L/usr/lib/gcc-cross/aarch64-linux-gnu/*" kpf-test.linux |