diff --git a/.github/actions/install-llvm/index.js b/.github/actions/install-llvm/index.js index ed2ee0621..d53b6f42b 100644 --- a/.github/actions/install-llvm/index.js +++ b/.github/actions/install-llvm/index.js @@ -28,13 +28,14 @@ export async function execute(cmd) { } (async () => { + core.setCommandEcho(true) try { if(isLinux) { await exec.exec("sudo apt install llvm-7 llvm-7-* liblld-7*"); } else if(isMacOS) { await exec.exec("brew install llvm@7") let llvmPath = await execute("brew --prefix llvm@7"); - core.addPath(`${llvmPath}/bin`) + core.addPath(`${llvmPath}/bin`) } else if(isWindows) { let llvmCachedPath = tc.find("llvm", "7.1.0", "windows-x64"); if(!llvmCachedPath) { @@ -44,6 +45,7 @@ export async function execute(cmd) { .then(extractPath => tc.cacheDir(extractPath, "llvm", "7.1.0", "windows-x64")); } core.addPath(`${llvmCachedPath}/bin`) + core.exportVariable('LIBCLANG_PATH', `${llvmCachedPath}/bin`) } else { core.setFailed(`unsupported platform '${process.platform}'`) } diff --git a/.github/actions/install-llvm/package-lock.json b/.github/actions/install-llvm/package-lock.json index 344d66253..0b876d756 100644 --- a/.github/actions/install-llvm/package-lock.json +++ b/.github/actions/install-llvm/package-lock.json @@ -5,30 +5,41 @@ "requires": true, "dependencies": { "@actions/core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz", - "integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.4.tgz", + "integrity": "sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==" }, "@actions/exec": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", - "integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", + "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", + "requires": { + "@actions/io": "^1.0.1" + } + }, + "@actions/http-client": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.8.tgz", + "integrity": "sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==", + "requires": { + "tunnel": "0.0.6" + } }, "@actions/io": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz", - "integrity": "sha512-rhq+tfZukbtaus7xyUtwKfuiCRXd1hWSfmJNEpFgBQJ4woqPEpsBw04awicjwz9tyG2/MVhAEMfVn664Cri5zA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", + "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" }, "@actions/tool-cache": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.1.2.tgz", - "integrity": "sha512-IJczPaZr02ECa3Lgws/TJEVco9tjOujiQSZbO3dHuXXjhd5vrUtfOgGwhmz3/f97L910OraPZ8SknofUk6RvOQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.5.5.tgz", + "integrity": "sha512-y/YO37BOaXzOEHpvoGZDLCwvg6XZWQ7Ala4Np4xzrKD1r48mff+K/GAmzXMejnApU7kgqC6lL/aCKTZDCrhdmw==", "requires": { - "@actions/core": "^1.1.0", - "@actions/exec": "^1.0.1", + "@actions/core": "^1.2.3", + "@actions/exec": "^1.0.0", + "@actions/http-client": "^1.0.8", "@actions/io": "^1.0.1", "semver": "^6.1.0", - "typed-rest-client": "^1.4.0", "uuid": "^3.3.2" } }, @@ -43,28 +54,14 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, "tunnel": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" - }, - "typed-rest-client": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz", - "integrity": "sha512-DVZRlmsfnTjp6ZJaatcdyvvwYwbWvR4YDNFDqb+qdTxpvaVP99YCpBkA8rxsLtAPjBVoDe4fNsnMIdZTiPuKWg==", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - } - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" } } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9273cb487..274735bd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,42 +7,42 @@ env: jobs: - check: - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - - name: Install Rust (stable) - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Install LLVM - uses: ./.github/actions/install-llvm - - - name: Cargo check - uses: actions-rs/cargo@v1 - with: - command: check + # check: + # name: Check + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # with: + # submodules: true + + # - name: Install Rust (stable) + # uses: actions-rs/toolchain@v1 + # with: + # profile: minimal + # toolchain: stable + # override: true + + # - name: Install LLVM + # uses: ./.github/actions/install-llvm + + # - name: Cargo check + # uses: actions-rs/cargo@v1 + # with: + # command: check test: name: Test runs-on: ${{ matrix.config.os }} - needs: check + # needs: check strategy: fail-fast: false matrix: config: - - { os: "ubuntu-latest", toolchain: "stable"} - - { os: "ubuntu-latest", toolchain: "beta"} - - { os: "ubuntu-latest", toolchain: "nightly"} + # - { os: "ubuntu-latest", toolchain: "stable"} + # - { os: "ubuntu-latest", toolchain: "beta"} + # - { os: "ubuntu-latest", toolchain: "nightly"} - { os: "windows-2016", toolchain: "stable"} - - { os: "macOS-latest", toolchain: "stable"} + # - { os: "macOS-latest", toolchain: "stable"} steps: - uses: actions/checkout@v2 with: @@ -59,7 +59,12 @@ jobs: - name: Install LLVM uses: ./.github/actions/install-llvm + - name: Print a greeting + run: | + echo "Clang path: $env:LIBCLANG_PATH" + - name: Cargo build + if: ${{ matrix.config.os == 'ubuntu-latest' && matrix.config.toolchain == 'stable' }} uses: actions-rs/cargo@v1 continue-on-error: ${{ matrix.config.toolchain == 'nightly' }} with: @@ -84,60 +89,60 @@ jobs: command: test args: -- --nocapture - style: - name: Check Style - runs-on: ubuntu-latest - needs: check - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: clippy, rustfmt - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - - name: Install LLVM - uses: ./.github/actions/install-llvm - - - name: Run cargo clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features - - tarpaulin: - runs-on: ubuntu-latest - needs: check - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - name: Install LLVM - uses: ./.github/actions/install-llvm - - - name: Run cargo-tarpaulin - uses: actions-rs/tarpaulin@v0.1 - - - uses: codecov/codecov-action@v1 - with: - file: ${{ steps.coverage.outputs.report }} - name: ${{ matrix.os }} + # style: + # name: Check Style + # runs-on: ubuntu-latest + # needs: check + # steps: + # - uses: actions/checkout@v2 + # with: + # submodules: true + + # - name: Install stable toolchain + # uses: actions-rs/toolchain@v1 + # with: + # profile: minimal + # toolchain: stable + # override: true + # components: clippy, rustfmt + + # - name: Run cargo fmt + # uses: actions-rs/cargo@v1 + # with: + # command: fmt + # args: --all -- --check + + # - name: Install LLVM + # uses: ./.github/actions/install-llvm + + # - name: Run cargo clippy + # uses: actions-rs/clippy-check@v1 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # args: --all-features + + # tarpaulin: + # runs-on: ubuntu-latest + # needs: check + # steps: + # - uses: actions/checkout@v2 + # with: + # submodules: true + + # - name: Install toolchain + # uses: actions-rs/toolchain@v1 + # with: + # toolchain: stable + # override: true + + # - name: Install LLVM + # uses: ./.github/actions/install-llvm + + # - name: Run cargo-tarpaulin + # uses: actions-rs/tarpaulin@v0.1 + + # - uses: codecov/codecov-action@v1 + # with: + # file: ${{ steps.coverage.outputs.report }} + # name: ${{ matrix.os }} \ No newline at end of file