Fixing WASM build #47
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
name: C/C++ CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Install bison' | |
run: sudo apt install bison | |
- name: 'Install sshpass' | |
run: sudo apt-get install sshpass | |
- name: 'Install scp' | |
run: sudo apt-get install openssh-client | |
- name: Setup emsdk | |
uses: mymindstorm/setup-emsdk@v14 | |
with: | |
# Make sure to set a version number! | |
version: 3.1.64 | |
# This is the name of the cache folder. | |
# The cache folder will be placed in the build directory, | |
# so make sure it doesn't conflict with anything! | |
actions-cache-folder: 'emsdk-cache' | |
- name: Verify | |
run: emcc -v | |
- name: 'Create env file' | |
run: | | |
touch .env | |
echo CC="gcc" >> .env | |
echo WC="emcc" >> .env | |
echo BC="bison" >> .env | |
cat .env | |
- name: make | |
run: make wasm | |
- name: upload | |
env: | |
remote_password: ${{ secrets.JOSEPH_PASSWORD }} | |
remote_user: ${{ secrets.JOSEPH_USER }} | |
remote_ip: ${{ secrets.JOSEPH_IP }} | |
remote_destination: ${{ secrets.JOSEPH_DESTINATION }} | |
run: | | |
ls -al | |
sshpass -p "$remote_password" scp -o StrictHostKeyChecking=no markov.wasm $remote_user@$remote_ip:$remote_destination/ | |
sshpass -p "$remote_password" scp -o StrictHostKeyChecking=no markov.js $remote_user@$remote_ip:$remote_destination/ | |
# - name: test | |
# run: ./main programs/1.2.6.a |