-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Este cambio hace que se cree un release cada vez que se empuje a master.
- Loading branch information
Showing
5 changed files
with
100 additions
and
4 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
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,81 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
|
||
release: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Get the version | ||
id: get-version | ||
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm install | ||
sudo apt-get -y install llvm | ||
- name: Build CLI karel | ||
run: | | ||
npm run build:bundle | ||
tar cJf dist/karel.js.tar.xz '--transform=s/dist\///' dist/*.js dist/*.node | ||
- name: Build distributable .zip | ||
run: | | ||
zip --recurse-paths dist/karel.zip \ | ||
cmd/ css/ gramaticas/ img/ js/ lib/ manual/ LICENSE ayuda.html \ | ||
sandbox.html README.md index.html | ||
- name: Build C++ karel | ||
run: | | ||
(cd cpp && make karel) | ||
- name: Create Release | ||
id: create-release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.get-version.outputs.version }} | ||
release_name: ${{ steps.get-version.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload karel.zip Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
asset_path: ./dist/karel.zip | ||
asset_name: karel.zip | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Upload karel.js.tar.xz Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
asset_path: ./dist/karel.js.tar.xz | ||
asset_name: karel.js.tar.xz | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Upload karel Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
asset_path: ./cpp/karel | ||
asset_name: karel | ||
asset_content_type: application/octet-stream |
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 |
---|---|---|
|
@@ -11,3 +11,6 @@ karel-distrib.min.js | |
test/.cache/ | ||
test/results/ | ||
test/**/*.png | ||
|
||
cpp/sol.kx | ||
cpp/karel |
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,9 +1,13 @@ | ||
#!/bin/bash | ||
|
||
for problem in ../test/problems/*; do | ||
set -e | ||
|
||
ROOT="$(git rev-parse --show-toplevel)" | ||
|
||
for problem in "${ROOT}/test/problems/"*; do | ||
echo $(basename "${problem}") | ||
../cmd/kareljs compile "${problem}/sol.txt" -o sol.kx || die | ||
"${ROOT}/cmd/kareljs" compile "${problem}/sol.txt" -o "${ROOT}/cpp/sol.kx" | ||
for casename in "${problem}/cases"/*.in; do | ||
./karel sol.kx < "${casename}" | diff -Naurw --ignore-blank-lines "${casename%.in}.out" - | ||
"${ROOT}/cpp/karel" "${ROOT}/cpp/sol.kx" < "${casename}" | diff -Naurw --ignore-blank-lines "${casename%.in}.out" - | ||
done | ||
done |
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