-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ad1d97
commit 7059f68
Showing
6 changed files
with
1,051 additions
and
9,012 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: linux | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
push: | ||
paths-ignore: | ||
- '.github/workflows/windows.yaml' | ||
# - '.github/workflows/macos.yaml' | ||
- 'README.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
arch: [x86_64] | ||
mode: [release] | ||
compiler: [clang, gcc] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Install system dependencies (opengl) | ||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install mesa-common-dev | ||
- name: Set xmake env | ||
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV | ||
|
||
# Install xmake | ||
- name: Setup xmake | ||
uses: xmake-io/github-action-setup-xmake@v1 | ||
with: | ||
xmake-version: latest | ||
actions-cache-folder: .xmake-cache | ||
|
||
# Update xmake repository | ||
- name: Update xmake repository | ||
run: xmake repo --update | ||
|
||
# Create xmake dependencies hash | ||
- name: Retrieve dependencies hash | ||
id: dep_hash | ||
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT | ||
|
||
# Cache xmake dependencies | ||
- name: Retrieve cached xmake dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages | ||
key: Linux-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }} | ||
|
||
# Config xmake | ||
- name: Config | ||
run: | | ||
xmake f -y -a ${{ matrix.arch }} -m ${{ matrix.mode }} --toolchain=${{ matrix.compiler }} | ||
# Build | ||
- name: Build | ||
run: | | ||
xmake -vD | ||
- name: Test | ||
run: | | ||
xmake test |
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,65 @@ | ||
name: windows | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
push: | ||
paths-ignore: | ||
- '.github/workflows/linux.yaml' | ||
# - '.github/workflows/macos.yaml' | ||
- 'README.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
arch: [x64] | ||
mode: [release] | ||
compiler: [msvc] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Force xmake to a specific folder (for cache) | ||
- name: Set xmake env | ||
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
|
||
# Install xmake | ||
- name: Setup xmake | ||
uses: xmake-io/github-action-setup-xmake@v1 | ||
with: | ||
xmake-version: latest | ||
actions-cache-folder: .xmake-cache | ||
|
||
# Update xmake repository (in order to have the file that will be cached) | ||
- name: Update xmake repository | ||
run: xmake repo --update | ||
|
||
# Fetch xmake dep hash | ||
- name: Retrieve dependencies hash | ||
id: dep_hash | ||
run: echo "hash=$(xmake l utils.ci.packageskey)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
|
||
# Cache xmake dependencies | ||
- name: Retrieve cached xmake dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.XMAKE_GLOBALDIR }}\.xmake\packages | ||
key: Windows-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }} | ||
|
||
- name: Config | ||
run: | | ||
xmake f -y -a ${{ matrix.arch }} -m ${{ matrix.mode }} --toolchain=${{ matrix.compiler }} | ||
- name: Build | ||
run: | | ||
xmake -vD | ||
- name: Test | ||
run: | | ||
xmake test |
Oops, something went wrong.