diff options
| author | A2va <[email protected]> | 2025-01-15 12:46:13 +0100 |
|---|---|---|
| committer | A2va <[email protected]> | 2025-01-16 10:59:08 +0100 |
| commit | d8e630b6f19c7383d19329deea69ca06891f4bc5 (patch) | |
| tree | 8e5692a747551150ac998f7edb5edf52d3415e84 | |
| parent | 58c00fc0baa75fb7e5220fc2afe6402ae2c17772 (diff) | |
Re-add cosmocc actions
| -rw-r--r-- | .github/workflows/cosmocc.yml | 62 | ||||
| -rw-r--r-- | .github/workflows/cosmocc_macos.yml | 66 |
2 files changed, 128 insertions, 0 deletions
diff --git a/.github/workflows/cosmocc.yml b/.github/workflows/cosmocc.yml new file mode 100644 index 000000000..30d68d07c --- /dev/null +++ b/.github/workflows/cosmocc.yml @@ -0,0 +1,62 @@ +name: Cosmocc (linux-x86_64) + +on: + pull_request: + push: + release: + types: [published] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + arch: [x86_64] + + runs-on: ${{ matrix.os }} + + concurrency: + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Cosmocc-${{ matrix.arch }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare local xmake + run: cp -rf . ../xmake-source + + - uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: local#../xmake-source + + - uses: bjia56/setup-cosmocc@main + with: + version: "4.0.2" + + - name: Build + run: | + cd core + xmake f -p linux --cosmocc=y --embed=y -y -cvD + xmake -v + cd .. + + - name: Prepare + run: | + sudo apt update + sudo apt install -y ruby ruby-dev rubygems build-essential llvm libc++-dev + sudo apt install -y libgl1-mesa-dev libglu1-mesa-dev + clang --version + + - name: Tests + run: | + ls -l core/build/ + core/build/xmake --version + core/build/xmake lua -v -D tests/run.lua + + - name: Artifact + uses: actions/upload-artifact@v4 + with: + name: xmake-cosmocc + path: core/build/xmake
\ No newline at end of file diff --git a/.github/workflows/cosmocc_macos.yml b/.github/workflows/cosmocc_macos.yml new file mode 100644 index 000000000..11f47c90f --- /dev/null +++ b/.github/workflows/cosmocc_macos.yml @@ -0,0 +1,66 @@ +name: Cosmocc (macos-x86_64) + +on: + pull_request: + push: + release: + types: [published] +jobs: + build: + strategy: + matrix: + os: [macos-13] + arch: [x86_64] + + runs-on: ${{ matrix.os }} + + concurrency: + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Cosmocc-${{ matrix.arch }} + cancel-in-progress: true + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare local xmake + run: cp -rf . ../xmake-source + + - uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: local#../xmake-source + + - uses: bjia56/setup-cosmocc@main + with: + version: "4.0.2" + + - name: Installation + run: | + brew install dmd + brew install dub + + - name: Build + run: | + cd core + xmake f -p linux --cosmocc=y --embed=y -y -cvD + xmake -v + cd .. + + # In the tests, cmake tries to use make from the cosmopolitan toolchain and fails, so uninstall it + - name: Remove cosmocc + run: | + INSTALL_DIR="${{runner.temp}}/cosmocc-4.0.2" + echo "Removing cosmocc from PATH" + echo "::remove-path::${INSTALL_DIR}/bin" + rm -r "${INSTALL_DIR}" + + - name: Tests + run: | + ls -l core/build/ + core/build/xmake --version + core/build/xmake lua -v -D tests/run.lua + + - name: Artifact + uses: actions/upload-artifact@v4 + with: + name: xmake-cosmocc + path: core/build/xmake
\ No newline at end of file |
