Create AppImage in push workflow #351
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: Build and Test | |
on: [push] | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04, windows-latest, macos-13, macos-14] | |
name: ${{ matrix.os == 'ubuntu-24.04' && 'linux-x86_64' || matrix.os == 'macos-13' && 'macos-x86_64' || matrix.os == 'macos-14' && 'macos-arm64' || 'windows-x86_64' }} | |
env: | |
plat: ${{ matrix.os == 'ubuntu-24.04' && 'linux-x86_64' || matrix.os == 'macos-13' && 'macos-x86_64' || matrix.os == 'macos-14' && 'macos-arm64' || 'windows-x86_64' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: extractions/setup-just@v2 | |
name: Install just | |
- name: Install libclang, llvm | |
run: | | |
sudo apt -y install libclang-18-dev libllvm18 | |
sudo ln -rfs /usr/lib/x86_64-linux-gnu/libclang-18.so /usr/lib/x86_64-linux-gnu/libclang.so | |
sudo ln -rfs /usr/lib/llvm-18/lib/libLLVM.so.1 /usr/lib/libLLVM-18.so.18.1 | |
if: matrix.os == 'ubuntu-24.04' | |
- name: Copy libclang | |
run: | | |
New-Item -Path build -ItemType Directory | |
Copy-Item -Path .\shared\libclang\lib\windows\x86_64\libclang.dll -Destination .\build\ | |
if: matrix.os == 'windows-latest' | |
- name: Install llvm | |
run: brew install llvm@18 | |
if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | |
- uses: laytan/setup-odin@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release: dev-2024-12 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
if: matrix.os == 'windows-latest' | |
- name: Test | |
uses: nick-fields/retry@v3 | |
with: | |
command: just test | |
timeout_minutes: 2 | |
retry_wait_seconds: 1 | |
max_attempts: 1 | |
- name: example/olivec | |
run: just example olivec | |
- name: Build runic release | |
run: just | |
if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | |
- name: Build runic AppImage | |
run: | | |
mkdir appimagetool_bin/ | |
just install-appimagetool appimagetool_bin/ | |
export PATH=$(pwd)/appimagetool_bin/:$PATH | |
just package | |
if: matrix.os == 'ubuntu-24.04' | |
- name: Build runic release | |
run: just package | |
if: matrix.os == 'windows-latest' | |
- name: Rename runic artifact | |
run: mv build/runic build/runic.${{ env.plat }} | |
if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | |
- uses: actions/upload-artifact@v4 | |
if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | |
with: | |
name: runic-${{ env.plat }} | |
path: ${{ github.workspace }}/build/runic.${{ env.plat }} | |
if-no-files-found: warn | |
overwrite: true | |
compression-level: 0 | |
- uses: actions/upload-artifact@v4 | |
if: matrix.os == 'ubuntu-24.04' | |
with: | |
name: runic-${{ env.plat }} | |
path: ${{ github.workspace }}/build/package/* | |
if-no-files-found: warn | |
overwrite: true | |
compression-level: 0 | |
- uses: actions/upload-artifact@v4 | |
if: matrix.os == 'windows-latest' | |
with: | |
name: runic-${{ env.plat }} | |
path: ${{ github.workspace }}/build/runic.*.zip | |
if-no-files-found: warn | |
overwrite: true | |
compression-level: 0 | |
create-release: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: startsWith(github.ref, 'refs/tags/') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: artifacts | |
- name: List all artifacts | |
run: ls -la --color=always artifacts | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'artifacts/*' | |
body: | | |
Automatically generated by Github Actions Run ${{ github.run_id }} | |
generateReleaseNotes: true | |
makeLatest: true |