Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2fbe1a7
update line ending attributes
kristjanvalur Apr 7, 2021
e7878f9
Update test.yml
kristjanvalur Apr 11, 2021
82d424e
Update documentation
kristjanvalur Apr 11, 2021
6db389b
Merge branch 'master' into dev
kristjanvalur Apr 11, 2021
89dc67c
Add test case for calling stackman_call() with null pointer
kristjanvalur Apr 11, 2021
9c8b64a
Add stackman_call to switch_template.h
kristjanvalur Apr 11, 2021
182c35b
stackman_call-nullptr for x64-linux
kristjanvalur Apr 11, 2021
65eb17c
disable fail-fast on matrix jobs
kristjanvalur Apr 11, 2021
71e0206
add zero-stack arg support for linux x86
kristjanvalur Apr 11, 2021
1c3cfc1
add nullptr support for x86 msvc
kristjanvalur Apr 11, 2021
dc8cd2e
add nullptr support for stackman_call, msvc-amd64
kristjanvalur Apr 11, 2021
0da1323
stackman_call nullptr support for ARM
kristjanvalur Apr 11, 2021
9f60afd
stackman_call nullptr support for AARCH64
kristjanvalur Apr 11, 2021
aab9dc5
Add stackman_call() nullptr support for msvc arm/aarch64
kristjanvalur Apr 11, 2021
71bf16d
Ad build workflow
kristjanvalur Apr 11, 2021
f1fb0c8
Update buildcommit.yml
kristjanvalur Apr 11, 2021
6b8c7a4
Automated build
buildrunner Apr 11, 2021
573c15a
Update buildcommit.yml
kristjanvalur Apr 11, 2021
69ad2c5
Automated build
buildrunner Apr 11, 2021
e1cec3b
Update buildcommit.yml
kristjanvalur Apr 11, 2021
d252a4d
Automated build
buildrunner Apr 11, 2021
cf5d06e
makefile can echo the abiname
kristjanvalur Apr 12, 2021
d43e84a
Automated build
buildrunner Apr 12, 2021
cdef453
Update buildcommit.yml
kristjanvalur Apr 12, 2021
464c90f
Update buildcommit.yml
kristjanvalur Apr 12, 2021
66de59a
Update buildcommit.yml
kristjanvalur Apr 12, 2021
390006a
Update buildcommit.yml
kristjanvalur Apr 12, 2021
004a248
Update buildcommit.yml
kristjanvalur Apr 12, 2021
5b8dbac
Update buildcommit.yml
kristjanvalur Apr 12, 2021
3fc91ae
Update buildcommit.yml
kristjanvalur Apr 12, 2021
e607b7e
don't include final hyphen in PLATFORM_PREFIX
kristjanvalur Apr 12, 2021
ea14317
Update buildcommit.yml
kristjanvalur Apr 12, 2021
d77e9d5
Move the abiname discovery stuff into "tools"
kristjanvalur Apr 12, 2021
b1f01c2
Update buildcommit.yml
kristjanvalur Apr 12, 2021
bde6ceb
A tool to strip timestamps from windows .lib files
kristjanvalur Apr 12, 2021
69c448f
Merge branch 'dev' of github.com:kristjanvalur/stackman into dev
kristjanvalur Apr 12, 2021
d02f4a3
Ad vscode devcontainer config
kristjanvalur Apr 12, 2021
627c5f5
update build step to strip timestamps from libs
kristjanvalur Apr 12, 2021
a4f4996
invoke shell on abiname.sh
kristjanvalur Apr 12, 2021
d826713
fix
kristjanvalur Apr 12, 2021
b418d13
Automated build
automation-tool Apr 12, 2021
d965c83
update status badge
kristjanvalur Apr 12, 2021
b387bcc
Merge branch 'dev' of github.com:kristjanvalur/stackman into dev
kristjanvalur Apr 12, 2021
bc6dd50
Automated build
automation-tool Apr 12, 2021
1eb8da3
Add features to the windows lib stripper.
kristjanvalur Apr 12, 2021
689c45c
Automated build
automation-tool Apr 12, 2021
fe3e2c6
more info for git commit
kristjanvalur Apr 12, 2021
8e01a2e
Merge remote-tracking branch 'origin/dev' into dev
kristjanvalur Apr 12, 2021
65d6d81
Merge pull request #2 from kristjanvalur/dev
kristjanvalur Apr 13, 2021
e56ae0b
Merge remote-tracking branch 'upstream/master'
kristjanvalur Jul 25, 2021
4606e73
Fix readme
kristjanvalur Jul 25, 2021
fa40e7e
Automated build
automation-tool Jul 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version: bionic, focal
ARG VARIANT="focal"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends build-essential


29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: focal, bionic
"args": { "VARIANT": "focal" }
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.cpptools"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
25 changes: 21 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# use unix lf line ending for everything except windows bat files
* text=auto eol=lf
*.asm text eol=lf
*.h text eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf

# libraries are bin
*.o binary
*.obj binary
*.a binary
*.so binary
*.lib binary
*.dll binary
*.pdb binary


# source files explicitly
*.{c,h,asm,S} text eol=lf

*.cmd text eol=crlf
*.bat text eol=crlf

# Visulal studio is happier with crlf
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
108 changes: 108 additions & 0 deletions .github/workflows/buildcommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: build test and commit

on:
push:
branches: [ master, dev ]

pull_request:
branches: [ master ]

jobs:

build-linux-gnu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: [AMD64, i386, arm, aarch64]
include:
- name: i386
platformflags: -m32
- name: arm
platformtools: arm-linux-gnueabi
emulator: qemu-arm
- name: aarch64
platformtools: aarch64-linux-gnu
emulator: qemu-aarch64
# name: build-linux-gnu (${{matrix.name}})
env:
PLATFORMFLAGS: ${{matrix.platformflags}}
PLATFORM_PREFIX: ${{matrix.platformtools}}
EMULATOR: ${{matrix.emulator}}
steps:
- uses: actions/checkout@v2
- name: install multilib
run: sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib
if: ${{ matrix.name == 'i386' }}
- name: install qemu
if: matrix.emulator
run: sudo apt-get install --no-install-recommends -y qemu-user
- name: install abi lib
if: matrix.platformtools
run: sudo apt-get install --no-install-recommends -y gcc-${{matrix.platformtools}} g++-${{matrix.platformtools}}
- name: make
run: make all
- name: test
run: make test
- name: set abi name
run: echo abiname=$(make abiname) >> $GITHUB_ENV
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.abiname }}
path: lib/${{ env.abiname }}/libstackman.a

build-windows:
runs-on: windows-2019
strategy:
fail-fast: true
matrix:
platform: [x86, x64, arm, arm64]
include:
- platform: x86
folder: Win32
native: yes
- platform: x64
folder: x64
native: yes
- platform: arm
folder: arm
- platform: arm64
folder: arm64

steps:
- uses: actions/checkout@v2
- uses: microsoft/setup-msbuild@v1.0.2
- name: build
run: msbuild.exe vs2019\stackman.sln /p:Platform=${{matrix.platform}}
- name: strip timestamps from lib
run: python tools/strip-lib.py lib/win_${{matrix.platform}}/stackman.lib
- name: rebuild after stripping
run: msbuild.exe vs2019\stackman.sln /p:Platform=${{matrix.platform}}
- name: test
if: ${{ matrix.native == 'yes' }}
run: vs2019\${{matrix.folder}}\Debug\test.exe
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: win_${{ matrix.platform }}
path: lib/win_${{matrix.platform}}/stackman.lib

commit-artifacts:
runs-on: ubuntu-latest
needs: [build-linux-gnu, build-windows]
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
path: lib

- name: Commit changes
run: |
git config --global user.name 'Automation tool'
git config --global user.email 'automation-tool@users.noreply.github.com'
git add lib/*.a lib/*.lib
git status
git diff-index --quiet HEAD || git commit -m "Automated build"
git push
74 changes: 0 additions & 74 deletions .github/workflows/test.yml

This file was deleted.

12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ CXXFLAGS += $(NO_CET)

OLDCC := $(CC)
ifdef PLATFORM_PREFIX
CC = $(PLATFORM_PREFIX)gcc
CXX = $(PLATFORM_PREFIX)g++
LD = $(PLATFORM_PREFIX)ld
AR = $(PLATFORM_PREFIX)ar
CC = $(PLATFORM_PREFIX)-gcc
CXX = $(PLATFORM_PREFIX)-g++
LD = $(PLATFORM_PREFIX)-ld
AR = $(PLATFORM_PREFIX)-ar
endif
# run c preprocessor with any cflags to get cross compilation result, then run regular compile in native
ABI := $(shell ./abiname.sh "$(CC)" "$(CFLAGS)")
ABI := $(shell sh tools/abiname.sh "$(CC)" "$(CFLAGS)")
ifndef ABI
$(error Could not determine platform)
endif
Expand Down Expand Up @@ -46,7 +46,7 @@ lib:
clean:
rm -f stackman/*.o tests/*.o
rm -f bin/*
rm -rf tmp
rm -rf tmp tools/tmp

DEBUG = #-DDEBUG_DUMP

Expand Down
Loading