Update main.yml #19
Workflow file for this run
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: Main | |
on: [push] | |
jobs: | |
macos: | |
runs-on: macos-latest # This runs the job on macOS | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install Xcode Command Line Tools | |
run: | | |
sudo xcode-select --install || true | |
sudo xcodebuild -license accept | |
- name: Install dependencies | |
run: | | |
brew install glfw tree llvm@17 | |
- name: Download c3 tool | |
run: wget https://github.com/c3lang/c3c/releases/download/latest/c3-macos.zip | |
- name: Extract c3 tool | |
run: unzip c3-macos.zip | |
- name: List directory structure | |
run: tree -L 2 | |
- name: Build with c3 | |
run: ./macos/c3c build examples_template | |
linux: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, debian-11] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libglfw3 libglfw3-dev libgles2-mesa-dev | |
- name: Set tarball based on OS | |
run: echo "TARBALL_URL=https://github.com/c3lang/c3c/releases/download/latest/c3-${{ matrix.os == 'ubuntu-latest' && 'ubuntu-20' || 'linux' }}.tar.gz" >> $GITHUB_ENV | |
- name: Download c3 tool | |
run: wget ${{ env.TARBALL_URL }} | |
- name: Extract c3 tool | |
run: tar xvf c3-*.tar.gz | |
- name: Build with c3 | |
run: ./c3/c3c build examples_template |