From 30474c9f912240b9c4e5cb11265df9b5a3261a42 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Sat, 8 Aug 2020 14:29:59 -0400 Subject: [PATCH] Use Github Actions. --- .github/workflows/make.yml | 146 +++++++++++++++++++++++++++++++++++++ .travis.yml | 47 ------------ appveyor.yml | 69 ------------------ readme.md | 2 +- 4 files changed, 147 insertions(+), 117 deletions(-) create mode 100644 .github/workflows/make.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml new file mode 100644 index 000000000..3ba5f6cb5 --- /dev/null +++ b/.github/workflows/make.yml @@ -0,0 +1,146 @@ +name: Win/Mac/Linux + +on: + push: + branches: + - llvm + pull_request: + branches: + - llvm + +jobs: + build: + strategy: + fail-fast: false + matrix: + runs-on: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{matrix.runs-on}} + steps: + - name: Prepare Build Environment + run: | + cmake -E echo ::set-env name=ROM::84pce_515_53.rom + cmake -E echo ::set-env name=CEDEV::${{github.workspace}}/CEdev + cmake -E echo ::add-path::${{github.workspace}}/CEdev/bin + cmake -E echo ::add-path::${{github.workspace}}/CEmu/tests/autotester + - name: Prepare Build Environment + if: runner.os == 'Windows' + run: | + cmake -E echo ::set-env name=EXE::.exe + cmake -E echo ::set-env name=ENV::env: + + - name: Install Build Dependencies + if: runner.os == 'Linux' + run: sudo apt-get install -y doxygen + - name: Install Build Dependencies + if: runner.os == 'macOS' + run: brew install doxygen + + - name: Download ez80-clang + id: ez80-clang + uses: carlosperate/download-file-action@v1.0.3 + with: + file-url: https://jacobly.com/llvm/ez80-clang${{env.EXE}}-${{runner.os}}Release.zip + - name: Extract ez80-clang + uses: DuckSoft/extract-7z-action@v1.0 + with: + pathSource: ${{steps.ez80-clang.outputs.file-path}} + pathTarget: CEdev/bin + - name: Make ez80-clang Executable + if: runner.os != 'Windows' + run: chmod +x CEdev/bin/ez80-clang${{env.EXE}} + - name: Test ez80-clang + run: ez80-clang --version + + - name: Checkout Toolchain + uses: actions/checkout@v2 + with: + path: toolchain + submodules: recursive + + - name: Build Toolchain + run: make -j4 -C toolchain + - name: Install Toolchain + env: + PREFIX: ${{github.workspace}} + run: make -j4 -C toolchain install release release-libs + - name: Build Examples + run: make -j4 -C ${{env.CEDEV}}/examples + + - name: Checkout CEmu + uses: actions/checkout@v2 + with: + repository: CE-Programming/CEmu + ref: latest-stable + path: CEmu + submodules: recursive + + - name: Build CEmu + run: make -j4 -C CEmu/core + - name: Build Autotester CLI + run: make -j4 -C CEmu/tests/autotester + + - name: Download Secrets + id: download-secrets + uses: carlosperate/download-file-action@v1.0.3 + with: + file-url: https://jacobly.com/CE-Programming/secrets + location: secrets + - name: Decrypt Secrets + env: + KEY: ${{secrets.SYMMETRIC_KEY_256}} + run: openssl enc -d -aes-256-cbc -iv d0583d991fcb6c3b05fb8eabc7421fb8 -K "$${{env.ENV}}KEY" -in ${{steps.download-secrets.outputs.file-path}} -out secrets/secrets.7z + - name: Extract Secrets + uses: DuckSoft/extract-7z-action@v1.0 + with: + pathSource: secrets/secrets.7z + pathTarget: secrets + + - name: Test examples + if: runner.os != 'Windows' + env: + AUTOTESTER_LIBS_DIR: ${{github.workspace}}/toolchain/clibraries + AUTOTESTER_ROM: ${{github.workspace}}/secrets/${{env.ROM}} + run: | + failed=0 + for test in ${{env.CEDEV}}/examples/*/*/autotest.json; do + cmake -E echo "Launching autotester on $test" + autotester "$test" + cmake -E true $((failed += $?)) + done + exit $failed + - name: Test examples + if: runner.os == 'Windows' + env: + AUTOTESTER_LIBS_DIR: ${{github.workspace}}\toolchain\clibraries + AUTOTESTER_ROM: ${{github.workspace}}\secrets\${{env.ROM}} + run: | + $failed = 0 + foreach ($test in "${{env.CEDEV}}\examples\*\*\autotest.json") { + cmake -E echo "Launching autotester on $test" + autotester "$test" + $failed += $? + } + Exit $failed + + - name: Remove Secrets + if: always() + run: cmake -E rm -rf secrets + + - name: Upload CEdev + uses: actions/upload-artifact@v2 + with: + name: CEdev-${{runner.os}} + path: CEdev + + - name: Upload Libraries + uses: actions/upload-artifact@v2 + with: + name: clibraries + path: toolchain/clibraries + + - name: Upload Windows Installer + if: runner.os == 'Windows' + uses: actions/upload-artifact@v2 + with: + name: ${{runner.os}} + path: toolchain\tools\installer\CEdev.exe diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 853eb4921..000000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -os: linux -dist: bionic - -language: cpp - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libc6-i386 - - libstdc++6 - -script: -# - sudo apt install -y doxygen doxygen-doc -# Build toolchain and libs - - export WINEDEBUG=-all - - export CEDEV=~/CEdev - - export PATH=$CEDEV/bin/:$PATH - - export AUTOTESTER_LIBS_DIR=$(pwd)/clibraries - - wget https://jacobly.com/llvm/ez80-clang-LinuxRelease.zip - - mkdir -p $CEDEV/bin - - unzip ez80-clang-LinuxRelease.zip -d $CEDEV/bin - - chmod +x $CEDEV/bin/ez80-clang - - ez80-clang -v - - make install release release-libs -# Build examples - - make -C $CEDEV/examples -# Build CEmu core and autotester_cli - - git clone --recursive -b latest-stable --depth 1 https://github.com/CE-Programming/CEmu.git - - make -C CEmu/core -j4 - - make -C CEmu/tests/autotester -j2 - - export PATH=$(pwd)/CEmu/tests/autotester:$PATH -# Grab ROM for tests below - - export ROM_FILE_NAME=84pce_515_53.rom - - curl -s https://tiplanet.org/scripts/travis/$ROM_FILE_NAME 2>/dev/null > $ROM_FILE_NAME - - export AUTOTESTER_ROM=$(pwd)/$ROM_FILE_NAME -# Test toolchain examples - - RESULT=0; for f in $CEDEV/examples/*/*/*.json; do echo "Launching autotester on $f"; autotester "$f"; RESULT=`expr $RESULT + $?`; done; return $RESULT - -after_success: -# Update the funcs_tested file (WIP) - - ./tools/funcs_tested/gen_list.sh -# Build the doxygen -# - make doxygen -# Update repo files -# - bash .deploy.sh diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 9497e16c5..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,69 +0,0 @@ -version: "{branch}-ci-{build}" - -environment: - matrix: - - MINGW_ARCH: i686 - MINGW_ROOT: C:\MinGW - MSYS2_MINGW_ROOT_FOR_CEMU: C:\msys64\mingw32 - - MINGW_ARCH: x86_64 - MINGW_ROOT: C:\msys64\mingw64 - MSYS2_MINGW_ROOT_FOR_CEMU: C:\msys64\mingw64 - USING_MSYS2: yes - -install: - # Recursive checkout - - git submodule update --init --recursive - - # MinGW - - set OLD_PATH=%PATH% - - if defined MINGW_ROOT if not defined USING_MSYS2 set PATH=%MINGW_ROOT%\bin;%PATH% - - if defined MINGW_ROOT if defined USING_MSYS2 set PATH=%MINGW_ROOT%\bin;C:\msys64\usr\bin\;%PATH% - #- if defined MINGW_ARCH bash -lc "pacman --needed --noconfirm -S mingw-w64-%MINGW_ARCH%-boost mingw-w64-%MINGW_ARCH%-libarchive" - - - set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% - -build_script: - - if defined MINGW_ROOT mingw32-make -j%NUMBER_OF_PROCESSORS% install release release-libs - - # Some environment variables for later... - - set CEDEV=C:\CEdev - - set PATH=%CEDEV%\bin\;%PATH% - - set AUTOTESTER_LIBS_DIR=%CD%\clibraries - - # Build examples - - if defined MINGW_ROOT make -C %CEDEV%\examples - - # Build CEmu core and autotester_cli - - git clone --recursive -b latest-stable --depth 1 https://github.com/CE-Programming/CEmu.git - - # Workaround for bad bad symlinks (v1.0 seems to have them) - - if exist CEmu\core\debug\debug.cpp ( move CEmu\core\debug\debug.c CEmu\core\debug\debug.c.old & copy CEmu\core\debug\debug.cpp CEmu\core\debug\debug.c ) - - # Set env to MSYS2 - - set PATH=%MSYS2_MINGW_ROOT_FOR_CEMU%\bin;C:\msys64\usr\bin\;%OLD_PATH% - - make -C CEmu/core -j%NUMBER_OF_PROCESSORS% - - make -C CEmu/tests/autotester -j%NUMBER_OF_PROCESSORS% - - set PATH=%CD%\CEmu\tests\autotester;%PATH% - - # Grab ROM for tests below - - set ROM_FILE_NAME=84pce_515_53.rom - - curl -s https://tiplanet.org/scripts/travis/%ROM_FILE_NAME% 2> nul > %ROM_FILE_NAME% - - set AUTOTESTER_ROM=%CD%\%ROM_FILE_NAME% - - # Test toolchain examples - - cmd: run_autotester.bat - -after_build: - - cd %APPVEYOR_BUILD_FOLDER% - -on_success: - - cd %APPVEYOR_BUILD_FOLDER% - -on_failure: - - cd %APPVEYOR_BUILD_FOLDER% - -artifacts: - - path: release\CEdev.exe - name: CEdev.exe - type: auto - diff --git a/readme.md b/readme.md index de3cd116b..40aa4bb6c 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# CE C Programming Toolchain/SDK [![Build Status](https://api.travis-ci.org/CE-Programming/toolchain.svg?branch=master)](https://travis-ci.org/CE-Programming/toolchain) [![Build Status](https://ci.appveyor.com/api/projects/status/github/CE-Programming/toolchain?branch=master&svg=true)](https://ci.appveyor.com/project/adriweb/toolchain) [![IRC badge](https://img.shields.io/badge/IRC%20channel-%23ez80--dev%20on%20EFNet-blue.svg)](http://chat.efnet.org/irc.cgi?adv=1&nick=ce-dev&chan=%23ez80-dev) +# CE C Programming Toolchain/SDK [![Build Status](https://github.com/CE-Programming/toolchain/workflows/Win/Mac/Linux/badge.svg?branch=llvm)](https://github.com/CE-Programming/toolchain/actions?query=workflow%3AWin%2FMac%2FLinux) [![IRC badge](https://img.shields.io/badge/IRC%20channel-%23ez80--dev%20on%20EFNet-blue.svg)](http://chat.efnet.org/irc.cgi?adv=1&nick=ce-dev&chan=%23ez80-dev) The CE C Software Development Kit incorporates a wide variety of tools and documentation in order to build programs in C natively for the TI-84 Plus CE / TI-83 Premium CE calculators series.