forked from pclewis/lslint
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
349 additions
and
146 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
win: circleci/[email protected] | ||
|
||
jobs: | ||
build-osx: | ||
macos: | ||
xcode: 14.0.0 | ||
environment: | ||
BUILD_VERSION_NUMBER: ${CIRCLE_TAG} | ||
DEBUG: "" | ||
steps: | ||
- checkout | ||
- run: | ||
name: "make" | ||
command: | | ||
export PATH="/usr/local/opt/bison/bin:$PATH" | ||
make | ||
file -L lslint | ||
- run: | ||
name: "move" | ||
command: | | ||
mkdir -p binary/osx/ | ||
cp lslint binary/osx/ | ||
- persist_to_workspace: | ||
root: binary | ||
paths: | ||
- osx/lslint | ||
build-linux64: | ||
docker: | ||
- image: cimg/base:stable | ||
resource_class: small | ||
environment: | ||
BUILD_VERSION_NUMBER: ${CIRCLE_TAG} | ||
DEBUG: "" | ||
steps: | ||
- checkout | ||
- run: | ||
name: "install flex and bison" | ||
command: | | ||
sudo apt-get update | ||
sudo apt-get install flex bison | ||
- run: | ||
name: "make" | ||
command: | | ||
make | ||
file -L lslint | ||
- run: | ||
name: "move" | ||
command: | | ||
mkdir -p binary/linux64/ | ||
cp lslint binary/linux64/ | ||
cp kwdb_version.txt binary | ||
- persist_to_workspace: | ||
root: binary | ||
paths: | ||
- linux64/lslint | ||
- kwdb_version.txt | ||
build-linux32: | ||
docker: | ||
- image: cimg/base:stable | ||
resource_class: small | ||
environment: | ||
BUILD_VERSION_NUMBER: ${CIRCLE_TAG} | ||
BUILD_ADDITIONAL_ARG: "-m32" | ||
DEBUG: "" | ||
steps: | ||
- checkout | ||
- run: | ||
name: "install flex and bison and i386 related modules" | ||
command: | | ||
sudo apt-get update | ||
sudo apt-get install flex bison gcc-multilib g++-multilib | ||
- run: | ||
name: "make" | ||
command: | | ||
make | ||
file -L lslint | ||
- run: | ||
name: "move" | ||
command: | | ||
mkdir -p binary/linux32/ | ||
cp lslint binary/linux32/ | ||
- persist_to_workspace: | ||
root: binary | ||
paths: | ||
- linux32/lslint | ||
build-windows64: | ||
executor: | ||
name: win/default | ||
steps: | ||
- checkout | ||
- run: | ||
name: place-flex_bison | ||
command: | | ||
curl.exe -L -O https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip | ||
mkdir C:\win_flex_bison | ||
tar -xf win_flex_bison-2.5.25.zip -C C:\win_flex_bison | ||
- run: | ||
name: compile | ||
command: | | ||
$vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" | ||
$instanceId = & $vswhere -property instanceId -format value | ||
$installationPath = & $vswhere -property installationPath -format value | ||
Import-Module (Join-Path $installationPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") | ||
Enter-VsDevShell $instanceId -SkipAutomaticLocation -Arch amd64 | ||
$Env:BUILD_VERSION_NUMBER="$Env:CIRCLE_TAG" | ||
$Env:BUILD_DATE="$(Get-Date -Format "yyyy-MM-dd")" | ||
$Env:Path+=";C:\win_flex_bison" | ||
nmake /F NMakefile | ||
dumpbin /headers lslint.exe | ||
- run: | ||
name: move | ||
command: | | ||
mkdir binary\win64 | ||
cp lslint.exe binary\win64 | ||
- persist_to_workspace: | ||
root: binary | ||
paths: | ||
- win64/lslint.exe | ||
build-windows32: | ||
executor: | ||
name: win/default | ||
steps: | ||
- checkout | ||
- run: | ||
name: place-flex_bison | ||
command: | | ||
curl.exe -L -O https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip | ||
mkdir C:\win_flex_bison | ||
tar -xf win_flex_bison-2.5.25.zip -C C:\win_flex_bison | ||
- run: | ||
name: compile | ||
command: | | ||
$vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" | ||
$instanceId = & $vswhere -property instanceId -format value | ||
$installationPath = & $vswhere -property installationPath -format value | ||
Import-Module (Join-Path $installationPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") | ||
Enter-VsDevShell $instanceId -SkipAutomaticLocation -Arch x86 | ||
$Env:BUILD_VERSION_NUMBER="$Env:CIRCLE_TAG" | ||
$Env:BUILD_DATE="$(Get-Date -Format "yyyy-MM-dd")" | ||
$Env:Path+=";C:\win_flex_bison" | ||
nmake /F NMakefile | ||
dumpbin /headers lslint.exe | ||
- run: | ||
name: zip | ||
command: | | ||
mkdir binary\win32 | ||
cp lslint.exe binary\win32 | ||
- persist_to_workspace: | ||
root: binary | ||
paths: | ||
- win32/lslint.exe | ||
release: | ||
docker: | ||
- image: cimg/go:1.20 | ||
resource_class: small | ||
steps: | ||
- attach_workspace: | ||
at: ./artifacts | ||
- store_artifacts: | ||
path: ./artifacts | ||
- run: | ||
name: zip | ||
command: | | ||
mkdir zips | ||
pushd artifacts/win32/; zip ../../zips/lslint_${CIRCLE_TAG}_win32.zip lslint.exe; popd | ||
pushd artifacts/win64/; zip ../../zips/lslint_${CIRCLE_TAG}_win64.zip lslint.exe; popd | ||
pushd artifacts/linux32/; zip ../../zips/lslint_${CIRCLE_TAG}_linux32.zip lslint; popd | ||
pushd artifacts/linux64/; zip ../../zips/lslint_${CIRCLE_TAG}_linux64.zip lslint; popd | ||
pushd artifacts/osx/; zip ../../zips/lslint_${CIRCLE_TAG}_osx.zip lslint; popd | ||
- run: | ||
name: "Publish Release on GitHub" | ||
command: | | ||
RELEASE_BODY="$(tail -n +2 artifacts/kwdb_version.txt)" | ||
go install github.com/tcnksm/ghr@latest | ||
ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -b "${RELEASE_BODY}" -delete "${CIRCLE_TAG}" zips/ | ||
check-builtins: | ||
docker: | ||
- image: cimg/python:3.11 | ||
resource_class: small | ||
steps: | ||
- checkout | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "4f:89:75:4a:ac:38:d6:86:6a:99:d3:77:5a:cf:dd:32" | ||
- run: | ||
name: fetch_and_compare | ||
command: | | ||
curl -O https://raw.githubusercontent.com/Sei-Lisa/kwdb/master/outputs/builtins.txt | ||
hasdiff=$(git status --porcelain builtins.txt) | ||
if [ -n "${hasdiff}" ] ; then | ||
make builtins_txt.cc | ||
curl https://raw.githubusercontent.com/Sei-Lisa/kwdb/master/lsl2dfg/LSL2dfg.py -o /tmp/LSL2dfg.py | ||
curl https://raw.githubusercontent.com/Sei-Lisa/kwdb/master/database/kwdb.xml -o /tmp/kwdb.xml | ||
python /tmp/LSL2dfg.py --version --grid=sl,os --database=/tmp/kwdb.xml > kwdb_version.txt | ||
git config user.name "Makopoppo(via CircleCI)" | ||
git config user.email "[email protected]" | ||
git add builtins.txt builtins_txt.cc kwdb_version.txt | ||
git commit -m "update builtins_txt [ci skip]" | ||
git push --set-upstream origin ${CIRCLE_BRANCH} | ||
fi | ||
parameters: | ||
run-schedule: | ||
type: boolean | ||
default: false | ||
|
||
workflows: | ||
release-all: | ||
when: | ||
not: << pipeline.parameters.run-schedule >> | ||
jobs: | ||
- build-linux64: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- build-linux32: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- build-windows64: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- build-windows32: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- build-osx: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- release: | ||
filters: | ||
tags: | ||
only: | ||
- /.*/ | ||
branches: | ||
ignore: /.*/ | ||
requires: | ||
- build-linux32 | ||
- build-linux64 | ||
- build-windows64 | ||
- build-windows32 | ||
- build-osx | ||
check-builtins: | ||
when: << pipeline.parameters.run-schedule >> | ||
jobs: | ||
- check-builtins | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
# Compiler output files # | ||
######################### | ||
*.o | ||
*.obj | ||
*.output | ||
lslint | ||
*.log | ||
*db | ||
*.tlog | ||
*.lastbuildstate | ||
*.ilk | ||
lex.yy.c | ||
lslmini.tab.* | ||
*.pdb | ||
.vs\* | ||
build_dir\ | ||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
*.suo | ||
/binary | ||
# Editor backups # | ||
################## | ||
*~ | ||
/.vs | ||
# Compiler output files # | ||
######################### | ||
*.o | ||
*.obj | ||
*.output | ||
lslint | ||
lslint.exe | ||
*.log | ||
*db | ||
*.tlog | ||
*.lastbuildstate | ||
*.ilk | ||
lex.yy.c | ||
lslmini.tab.* | ||
*.pdb | ||
.vs\* | ||
build_dir\ | ||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
*.suo | ||
/binary | ||
# Editor backups # | ||
################## | ||
*~ | ||
/.vs |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.