NATMap: Bump up to 20240303. #16
Workflow file for this run
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: Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
env: | |
MUSL_SDK_URL: https://musl.cc | |
MUSL_SDK_X86_32: i486-linux-musl-cross.tgz | |
MUSL_SDK_X86_64: x86_64-linux-musl-cross.tgz | |
MUSL_SDK_ARM_32: arm-linux-musleabi-cross.tgz | |
MUSL_SDK_ARM_64: aarch64-linux-musl-cross.tgz | |
MUSL_SDK_MIPS_32: mips-linux-muslsf-cross.tgz | |
MUSL_SDK_MIPS_32_EL: mipsel-linux-muslsf-cross.tgz | |
MUSL_SDK_MIPS_64: mips64-linux-musl-cross.tgz | |
MUSL_SDK_MIPS_64_EL: mips64el-linux-musl-cross.tgz | |
MUSL_SDK_RISCV_32: riscv32-linux-musl-cross.tgz | |
MUSL_SDK_RISCV_64: riscv64-linux-musl-cross.tgz | |
jobs: | |
build: | |
name: Build and release | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
submodules: true | |
- name: Init | |
run: | | |
sudo apt -qq update | |
sudo apt -qq install -y wget git | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_X86_32 }} | |
tar xf ${{ env.MUSL_SDK_X86_32 }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_X86_64 }} | |
tar xf ${{ env.MUSL_SDK_X86_64 }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_ARM_32 }} | |
tar xf ${{ env.MUSL_SDK_ARM_32 }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_ARM_64 }} | |
tar xf ${{ env.MUSL_SDK_ARM_64 }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_32 }} | |
tar xf ${{ env.MUSL_SDK_MIPS_32 }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_32_EL }} | |
tar xf ${{ env.MUSL_SDK_MIPS_32_EL }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_64 }} | |
tar xf ${{ env.MUSL_SDK_MIPS_64 }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_64_EL }} | |
tar xf ${{ env.MUSL_SDK_MIPS_64_EL }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_RISCV_32 }} | |
tar xf ${{ env.MUSL_SDK_RISCV_32 }} | |
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_RISCV_64 }} | |
tar xf ${{ env.MUSL_SDK_RISCV_64 }} | |
- name: Gen Source | |
run: | | |
REV_ID=$(git tag --points-at HEAD) | |
if [ -z "${REV_ID}" ]; then | |
REV_ID=$(git rev-parse --short HEAD) | |
fi | |
mkdir -p natmap-${{ github.ref_name }} | |
git ls-files --recurse-submodules | tar c -O -T- | tar x -C natmap-${{ github.ref_name }} | |
echo ${REV_ID} > natmap-${{ github.ref_name }}/.version | |
tar caf natmap-${{ github.ref_name }}.tar.gz natmap-${{ github.ref_name }} | |
- name: Build Linux | |
run: | | |
# x86_32 | |
PREFIX=$(basename ${{ env.MUSL_SDK_X86_32 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-x86_32 | |
# x86_64 | |
PREFIX=$(basename ${{ env.MUSL_SDK_X86_64 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-x86_64 | |
# arm32 | |
PREFIX=$(basename ${{ env.MUSL_SDK_ARM_32 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-arm32 | |
# arm64 | |
PREFIX=$(basename ${{ env.MUSL_SDK_ARM_64 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-arm64 | |
# mips32 | |
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_32 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-mips32 | |
# mips32el | |
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_32_EL }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-mips32el | |
# mips64 | |
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_64 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-mips64 | |
# mips64el | |
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_64_EL }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-mips64el | |
# riscv32 | |
PREFIX=$(basename ${{ env.MUSL_SDK_RISCV_32 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-riscv32 | |
# riscv64 | |
PREFIX=$(basename ${{ env.MUSL_SDK_RISCV_64 }} cross.tgz) | |
make clean | |
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j | |
cp bin/natmap natmap-linux-riscv64 | |
- name: Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
- name: Upload source | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-${{ github.ref_name }}.tar.gz | |
asset_name: natmap-${{ github.ref_name }}.tar.gz | |
asset_content_type: application/octet-stream | |
- name: Upload linux-x86_32 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-x86_32 | |
asset_name: natmap-linux-x86_32 | |
asset_content_type: application/octet-stream | |
- name: Upload linux-x86_64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-x86_64 | |
asset_name: natmap-linux-x86_64 | |
asset_content_type: application/octet-stream | |
- name: Upload linux-arm32 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-arm32 | |
asset_name: natmap-linux-arm32 | |
asset_content_type: application/octet-stream | |
- name: Upload linux-arm64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-arm64 | |
asset_name: natmap-linux-arm64 | |
asset_content_type: application/octet-stream | |
- name: Upload linux-mips32 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-mips32 | |
asset_name: natmap-linux-mips32 | |
asset_content_type: application/octet-stream | |
- name: Upload linux-mips32el | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-mips32el | |
asset_name: natmap-linux-mips32el | |
asset_content_type: application/octet-stream | |
- name: Upload linux-mips64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-mips64 | |
asset_name: natmap-linux-mips64 | |
asset_content_type: application/octet-stream | |
- name: Upload linux-mips64el | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-mips64el | |
asset_name: natmap-linux-mips64el | |
asset_content_type: application/octet-stream | |
- name: Upload linux-riscv32 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-riscv32 | |
asset_name: natmap-linux-riscv32 | |
asset_content_type: application/octet-stream | |
- name: Upload linux-riscv64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./natmap-linux-riscv64 | |
asset_name: natmap-linux-riscv64 | |
asset_content_type: application/octet-stream |