Skip to content

Adding a debug step to the auto-build. #84

Adding a debug step to the auto-build.

Adding a debug step to the auto-build. #84

Workflow file for this run

name: C/C++ CI
on:
push:
branches: [ "main" ]
tags: ["v*"]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
target:
- arm-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- aarch64-apple-darwin
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
os:
- ubuntu-latest
- macos-latest
- windows-latest
exclude:
- target: aarch64-apple-darwin
os: windows-latest
- target: x86_64-apple-darwin
os: windows-latest
- target: arm-unknown-linux-gnu
os: windows-latest
- target: x86_64-unknown-linux-gnu
os: windows-latest
- target: x86_64-pc-windows-msvc
os: macos-latest
- target: arm-unknown-linux-gnu
os: macos-latest
- target: x86_64-unknown-linux-gnu
os: macos-latest
- target: x86_64-pc-windows-msvc
os: ubuntu-latest
- target: aarch64-apple-darwin
os: ubuntu-latest
- target: x86_64-apple-darwin
os: ubuntu-latest
runs-on: ${{ matrix.os }}
env:
CXXTARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v3
# https://github.com/taiki-e/setup-cross-toolchain-action
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- name: Optionally install libatomic for cross-compilation
if: ${{ matrix.target == 'arm-unknown-linux-gnu' }}
run: sudo apt-get install -y libatomic1-arm64-cross
- name: targets and version debug
run: clang++ -print-targets && clang++ --version
- name: make
run: make default
env:
TARGET: sorth-${{ matrix.target }}
- name: List files in build directory
run: ls -al build
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: sorth-${{ matrix.target }} # optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
path: build/sorth-${{ matrix.target }}*
# The desired behavior if no files are found using the provided path.
if-no-files-found: error
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'sorth-${{ matrix.target }}'
directory: 'build'
- name: release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "dist/sorth-${{ matrix.target }}.zip"
tags: true
draft: true