Skip to content

Rollback Example

Rollback Example #229

Workflow file for this run

on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-examples-linux:
runs-on: ubuntu-latest
env:
ROC_VERSION: nightly
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Update apt-get
run: sudo apt-get update
- name: Install Build Essentials
run: sudo apt install build-essential git
- name: Install Rust and Cargo
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Install ROC
run: |
# Install ROC
curl -fOL https://github.com/roc-lang/roc/releases/download/${ROC_VERSION}/roc_nightly-linux_x86_64-latest.tar.gz
mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
tar -xzf roc_nightly.tar.gz
rm roc_nightly.tar.gz
mv roc_nightly* roc_nightly
- name: Check ROC version
run: ./roc_nightly/roc version
- name: Run all tests
run: ROC=./roc_nightly/roc ./ci/all_tests.sh
test-examples-macos:
runs-on: macos-latest
env:
ROC_VERSION: nightly
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Build Essentials
run: brew install automake autoconf libtool
- name: Install Rust and Cargo
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Install ROC
run: |
# Install ROC
curl -fOL https://github.com/roc-lang/roc/releases/download/${ROC_VERSION}/roc_nightly-macos_apple_silicon-latest.tar.gz
mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
tar -xzf roc_nightly.tar.gz
rm roc_nightly.tar.gz
mv roc_nightly* roc_nightly
- name: Check ROC version
run: ./roc_nightly/roc version
- name: Run all tests
run: ROC=./roc_nightly/roc ./ci/all_tests.sh
test-examples-windows:
runs-on: windows-latest
env:
ROC_VERSION: nightly
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install ROC
run: .\windows\setup.ps1
- name: Check ROC version
run: .\windows\bin\roc.exe version
- name: Install GLFW
run: |
curl -L https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.bin.WIN64.zip --output glfw-3.4.bin.WIN64.zip
tar -xf glfw-3.4.bin.WIN64.zip
move glfw-3.4.bin.WIN64/lib-vc2022/glfw3_mt.lib ./glfw3_mt.lib
move glfw-3.4.bin.WIN64/include/GLFW ./GLFW
- name: Set environment variables for GLFW
run: |
$env:LIB = "${{ github.workspace }};$env:LIB"
$env:INCLUDE = "${{ github.workspace }};$env:INCLUDE"
- name: Build the basic-shapes example
run: |
.\windows\bin\roc.exe build --no-link --optimize --output=app.obj .\examples\basic-shapes.roc
cargo build
- name: Build the 2d_camera example
run: |
.\windows\bin\roc.exe build --no-link --optimize --output=app.obj .\examples\2d_camera.roc
cargo build
- name: Build the pong example
run: |
.\windows\bin\roc.exe build --no-link --optimize --output=app.obj .\examples\pong.roc
cargo build