github.com/gotranspile/cxgo@v0.3.7/.github/workflows/ci.yml (about)

     1  name: CI
     2  
     3  on:
     4    push:
     5    pull_request:
     6  
     7  jobs:
     8    test:
     9      name: Test
    10      runs-on: ubuntu-20.04
    11      steps:
    12        - name: Install Go
    13          uses: actions/setup-go@v2
    14          with:
    15            go-version: '1.18.x'
    16        - name: actions/checkout
    17          uses: actions/checkout@v2
    18        - name: actions/cache
    19          uses: actions/cache@v2
    20          with:
    21            path: ~/go
    22            key: ${{ env.GO_CACHE_PREFIX }}${{ hashFiles('go.mod') }}
    23            restore-keys: ${{ env.GO_CACHE_PREFIX }}
    24        - name: script
    25          run: |
    26            set -x
    27            go test -v ./...
    28            go build ./cmd/cxgo
    29  
    30    test-tcc:
    31      name: TCC Tests
    32      runs-on: ubuntu-20.04
    33      steps:
    34        - name: Install Go
    35          uses: actions/setup-go@v2
    36          with:
    37            go-version: '1.18.x'
    38        - name: actions/checkout
    39          uses: actions/checkout@v2
    40        - name: actions/cache
    41          uses: actions/cache@v2
    42          with:
    43            path: ~/go
    44            key: ${{ env.GO_CACHE_PREFIX }}${{ hashFiles('go.mod') }}
    45            restore-keys: ${{ env.GO_CACHE_PREFIX }}
    46        - name: actions/cache
    47          uses: actions/cache@v2
    48          with:
    49            path: ./.testdata/tcc
    50            key: tcc_${{ hashFiles('tcc_test.go') }}
    51            restore-keys: tcc_${{ hashFiles('tcc_test.go') }}
    52        - name: script
    53          run: |
    54            set -x
    55            CXGO_RUN_TESTS_TCC=true go test -v -run=TestTCCExecute
    56  
    57  #  test-gcc:
    58  #    name: GCC Tests
    59  #    runs-on: ubuntu-20.04
    60  #    steps:
    61  #      - name: actions/checkout
    62  #        uses: actions/checkout@v2
    63  #      - name: actions/cache
    64  #        uses: actions/cache@v2
    65  #        with:
    66  #          path: ~/go
    67  #          key: ${{ env.GO_CACHE_PREFIX }}${{ hashFiles('go.mod') }}
    68  #          restore-keys: ${{ env.GO_CACHE_PREFIX }}
    69  #      - name: actions/cache
    70  #        uses: actions/cache@v2
    71  #        with:
    72  #          path: ./.testdata/gcc
    73  #          key: gcc_${{ hashFiles('gcc_test.go') }}
    74  #          restore-keys: gcc_${{ hashFiles('gcc_test.go') }}
    75  #      - name: script
    76  #        run: |
    77  #          set -x
    78  #          CXGO_RUN_TESTS_GCC=true go test -timeout=15m -v -run=TestGCCExecute