Skip to content

dev

dev #933

Workflow file for this run

name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
- dev
tags:
- '[0-9]+-[0-9]+-[0-9]+'
schedule:
- cron: '0 2 * * 5'
workflow_dispatch:
defaults:
run:
shell: bash --noprofile --norc -CeEuxo pipefail {0}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
# tidy:
# uses: taiki-e/github-actions/.github/workflows/tidy.yml@main
# permissions:
# contents: read
# pull-requests: write # for gh pr edit --add-assignee
# repository-projects: read # for gh pr edit --add-assignee
# secrets: inherit
build:
# needs: tidy
strategy:
fail-fast: false
matrix:
include:
- target: linux-gnu
# - target: linux-gnu
# os: ubuntu-24.04-arm
- target: linux-musl
# - target: linux-musl
# os: ubuntu-24.04-arm
# - target: linux-uclibc
# - target: android
# - target: android
# os: ubuntu-24.04-arm
# - target: freebsd
# - target: freebsd
# os: ubuntu-24.04-arm
# - target: netbsd
# - target: openbsd
# - target: openbsd
# os: ubuntu-24.04-arm
# - target: dragonfly
# - target: dragonfly
# os: ubuntu-24.04-arm
# # TODO: undefined reference to `__sysconf_xpg7'/'__xnet7_socket'
# # - target: solaris
# # - target: solaris
# # os: ubuntu-24.04-arm
# - target: illumos
# - target: illumos
# os: ubuntu-24.04-arm
# - target: redox
# # - target: fuchsia
# - target: wasi
# - target: wasi
# os: ubuntu-24.04-arm
# - target: emscripten
# - target: emscripten
# os: ubuntu-24.04-arm
# - target: windows-gnu
# - target: windows-gnu
# os: ubuntu-24.04-arm
# - target: none
# - target: none
# os: ubuntu-24.04-arm
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
timeout-minutes: 150
permissions:
contents: read
packages: write # for push to ghcr
steps:
- uses: taiki-e/checkout-action@v1
- uses: taiki-e/github-actions/free-device-space@main
- uses: taiki-e/github-actions/setup-docker@main
with:
qemu: false
- run: |
docker login ghcr.io -u "${{ github.actor }}" --password-stdin <<<"${{ secrets.GITHUB_TOKEN }}"
printf 'PUSH_TO_GHCR=1\n' >>"${GITHUB_ENV}"
if: github.repository_owner == 'taiki-e' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
- run: tools/build-docker.sh "${{ matrix.target }}"
# manifest:
# if: github.repository_owner == 'taiki-e' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
# needs: build
# runs-on: ubuntu-latest
# timeout-minutes: 60
# permissions:
# contents: read
# packages: write # for push to ghcr
# steps:
# - uses: taiki-e/checkout-action@v1
# - run: |
# docker login ghcr.io -u "${{ github.actor }}" --password-stdin <<<"${{ secrets.GITHUB_TOKEN }}"
# printf 'PUSH_TO_GHCR=1\n' >>"${GITHUB_ENV}"
# if: github.repository_owner == 'taiki-e' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
# - run: tools/docker-manifest.sh
# codegen:
# runs-on: ubuntu-latest
# timeout-minutes: 60
# permissions:
# contents: read
# pull-requests: write # for gh pr edit --add-assignee
# repository-projects: read # for gh pr edit --add-assignee
# steps:
# - uses: taiki-e/checkout-action@v1
# - uses: taiki-e/github-actions/install-rust@nightly
# - run: tools/gen.sh
# - name: Handle diff
# id: diff
# run: tools/ci/gen.sh
# if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
# - run: git add -N . && git diff --exit-code
# - id: create-pull-request
# uses: peter-evans/create-pull-request@v7
# with:
# title: Update generated code
# body: |
# Auto-generated by CI using [create-pull-request](https://github.com/peter-evans/create-pull-request).
# branch: update-generated-code
# token: ${{ secrets.CREATE_PR_TOKEN }}
# if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
# - name: Notify PR author by assigning PR
# run: gh pr edit --add-assignee taiki-e "${PR_NUMBER:?}"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
# if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'